1
Fork 0

Reduce dependence on the target name

The target name can be anything with custom target specs. Matching on
fields inside the target spec is much more robust than matching on the
target name.
This commit is contained in:
bjorn3 2024-11-03 18:26:01 +00:00
parent 7028d9318f
commit 9e6d2da83d
5 changed files with 17 additions and 26 deletions

View file

@ -146,7 +146,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
// Wasm statics with custom link sections get special treatment as they
// go into custom sections of the wasm executable.
if self.tcx.sess.opts.target_triple.tuple().starts_with("wasm32") {
if self.tcx.sess.target.is_like_wasm {
if let Some(_section) = attrs.link_section {
unimplemented!();
}