File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -653,8 +653,16 @@ impl Step for Lld {
653653 // there's probably a lot of reasons you can't do that other than this.
654654 let llvm_config_shim = env:: current_exe ( ) . unwrap ( ) . with_file_name ( "llvm-config-wrapper" ) ;
655655
656+ // Re-use the same flags as llvm to control the level of debug information
657+ // generated for lld.
658+ let profile = match ( builder. config . llvm_optimize , builder. config . llvm_release_debuginfo ) {
659+ ( false , _) => "Debug" ,
660+ ( true , false ) => "Release" ,
661+ ( true , true ) => "RelWithDebInfo" ,
662+ } ;
663+
656664 cfg. out_dir ( & out_dir)
657- . profile ( "Release" )
665+ . profile ( profile )
658666 . env ( "LLVM_CONFIG_REAL" , & llvm_config)
659667 . define ( "LLVM_CONFIG_PATH" , llvm_config_shim)
660668 . define ( "LLVM_INCLUDE_TESTS" , "OFF" ) ;
You can’t perform that action at this time.
0 commit comments