File tree 1 file changed +3
-2
lines changed
src/librustc_codegen_llvm
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,10 @@ unsafe fn configure_llvm(sess: &Session) {
58
58
59
59
let cg_opts = sess. opts . cg . llvm_args . iter ( ) ;
60
60
let tg_opts = sess. target . target . options . llvm_args . iter ( ) ;
61
+ let sess_args = cg_opts. chain ( tg_opts) ;
61
62
62
63
let user_specified_args: FxHashSet < _ > =
63
- cg_opts . chain ( tg_opts ) . map ( |s| llvm_arg_to_arg_name ( s) ) . filter ( |s| s. len ( ) > 0 ) . collect ( ) ;
64
+ sess_args . clone ( ) . map ( |s| llvm_arg_to_arg_name ( s) ) . filter ( |s| s. len ( ) > 0 ) . collect ( ) ;
64
65
65
66
{
66
67
// This adds the given argument to LLVM. Unless `force` is true
@@ -107,7 +108,7 @@ unsafe fn configure_llvm(sess: &Session) {
107
108
// during inlining. Unfortunately these may block other optimizations.
108
109
add ( "-preserve-alignment-assumptions-during-inlining=false" , false ) ;
109
110
110
- for arg in & sess . opts . cg . llvm_args {
111
+ for arg in sess_args {
111
112
add ( & ( * arg) , true ) ;
112
113
}
113
114
}
You can’t perform that action at this time.
0 commit comments