We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4bf56c commit 6a50572Copy full SHA for 6a50572
src/bootstrap/native.rs
@@ -653,8 +653,16 @@ impl Step for Lld {
653
// there's probably a lot of reasons you can't do that other than this.
654
let llvm_config_shim = env::current_exe().unwrap().with_file_name("llvm-config-wrapper");
655
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
+
664
cfg.out_dir(&out_dir)
- .profile("Release")
665
+ .profile(profile)
666
.env("LLVM_CONFIG_REAL", &llvm_config)
667
.define("LLVM_CONFIG_PATH", llvm_config_shim)
668
.define("LLVM_INCLUDE_TESTS", "OFF");
0 commit comments