about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-03 18:26:01 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-03 18:29:01 +0000
commit9e6d2da83dcc7fe58c0352d61d20b42f09182c63 (patch)
treef9ebb56c5d347b083bb694d076701086f38e2607 /compiler/rustc_codegen_gcc
parent7028d9318fadc20e5e3058d52e44d785d31a6aaa (diff)
downloadrust-9e6d2da83dcc7fe58c0352d61d20b42f09182c63.tar.gz
rust-9e6d2da83dcc7fe58c0352d61d20b42f09182c63.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/consts.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/consts.rs b/compiler/rustc_codegen_gcc/src/consts.rs
index 660badb6a50..07c7a54de1c 100644
--- a/compiler/rustc_codegen_gcc/src/consts.rs
+++ b/compiler/rustc_codegen_gcc/src/consts.rs
@@ -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!();
             }