about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/lib.rs
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2023-10-26 17:42:02 -0400
committerAntoni Boucher <bouanto@zoho.com>2023-10-26 17:42:02 -0400
commitc797cccda61e1116fa4a2e8feb0fb43432add599 (patch)
tree0c135dadf0e67d118d77ddb06e449d0014f6f22a /compiler/rustc_codegen_gcc/src/lib.rs
parent8396efecf7d30ca9f7edcf76aba2ea388300f6ab (diff)
parente4fe941b11a55c5005630696e9b6d81c65f7bd04 (diff)
downloadrust-c797cccda61e1116fa4a2e8feb0fb43432add599.tar.gz
rust-c797cccda61e1116fa4a2e8feb0fb43432add599.zip
Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-update_cg_gcc_2023-10-25
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/lib.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/lib.rs b/compiler/rustc_codegen_gcc/src/lib.rs
index 6aa5b6bd1ff..a530fc994a2 100644
--- a/compiler/rustc_codegen_gcc/src/lib.rs
+++ b/compiler/rustc_codegen_gcc/src/lib.rs
@@ -12,6 +12,7 @@
  * TODO(antoyo): remove the patches.
  */
 
+#![cfg_attr(not(bootstrap), allow(internal_features))]
 #![cfg_attr(not(bootstrap), doc(rust_logo))]
 #![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
 #![feature(
@@ -251,8 +252,9 @@ impl ExtraBackendMethods for GccCodegenBackend {
             temp_dir: None,
         };
 
-        // TODO(antoyo): only set for x86.
-        mods.context.add_command_line_option("-masm=intel");
+        if tcx.sess.target.arch == "x86" || tcx.sess.target.arch == "x86_64" {
+            mods.context.add_command_line_option("-masm=intel");
+        }
         unsafe { allocator::codegen(tcx, &mut mods, module_name, kind, alloc_error_handler_kind); }
         mods
     }