File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/librustc_codegen_llvm Expand file tree Collapse file tree 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) {
5858
5959 let cg_opts = sess. opts . cg . llvm_args . iter ( ) ;
6060 let tg_opts = sess. target . target . options . llvm_args . iter ( ) ;
61+ let sess_args = cg_opts. chain ( tg_opts) ;
6162
6263 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 ( ) ;
6465
6566 {
6667 // This adds the given argument to LLVM. Unless `force` is true
@@ -107,7 +108,7 @@ unsafe fn configure_llvm(sess: &Session) {
107108 // during inlining. Unfortunately these may block other optimizations.
108109 add ( "-preserve-alignment-assumptions-during-inlining=false" , false ) ;
109110
110- for arg in & sess . opts . cg . llvm_args {
111+ for arg in sess_args {
111112 add ( & ( * arg) , true ) ;
112113 }
113114 }
You can’t perform that action at this time.
0 commit comments