@@ -87,6 +87,8 @@ pub fn compile_codegen_unit<'tcx>(tcx: TyCtxt<'tcx>, cgu_name: Symbol, supports_
87
87
// Instantiate monomorphizations without filling out definitions yet...
88
88
//let llvm_module = ModuleLlvm::new(tcx, &cgu_name.as_str());
89
89
let context = Context :: default ( ) ;
90
+ // TODO(antoyo): only set on x86 platforms.
91
+ context. add_command_line_option ( "-masm=intel" ) ;
90
92
// TODO(antoyo): only add the following cli argument if the feature is supported.
91
93
context. add_command_line_option ( "-msse2" ) ;
92
94
context. add_command_line_option ( "-mavx2" ) ;
@@ -109,20 +111,8 @@ pub fn compile_codegen_unit<'tcx>(tcx: TyCtxt<'tcx>, cgu_name: Symbol, supports_
109
111
context. add_command_line_option ( "-mvpclmulqdq" ) ;
110
112
context. add_command_line_option ( "-mavx" ) ;
111
113
112
- let mut has_set_asm_syntax = false ;
113
114
for arg in & tcx. sess . opts . cg . llvm_args {
114
- if arg. starts_with ( "--x86-asm-syntax=" ) {
115
- // LLVM uses the two same arguments as GCC: `att` and `intel`.
116
- let syntax = arg. splitn ( 2 , '=' ) . skip ( 1 ) . next ( ) . expect ( "missing argument" ) ;
117
- context. add_command_line_option ( & format ! ( "-masm={}" , syntax) ) ;
118
- has_set_asm_syntax = true ;
119
- } else {
120
- context. add_command_line_option ( arg) ;
121
- }
122
- }
123
- if !has_set_asm_syntax {
124
- // TODO(antoyo): only set on x86 platforms.
125
- context. add_command_line_option ( "-masm=intel" ) ;
115
+ context. add_command_line_option ( arg) ;
126
116
}
127
117
// NOTE: This is needed to compile the file src/intrinsic/archs.rs during a bootstrap of rustc.
128
118
context. add_command_line_option ( "-fno-var-tracking-assignments" ) ;
0 commit comments