diff options
| author | ridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com> | 2022-03-04 09:57:40 -0800 |
|---|---|---|
| committer | ridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com> | 2022-03-04 09:57:40 -0800 |
| commit | 6a50572c51d81e0aba542f0b0e73c376c7cbb9c2 (patch) | |
| tree | e1b45c08baa0064834c605d057804a0357e9b58e | |
| parent | b4bf56cd66ca83e908fd43bde4c627f94b2a8a9f (diff) | |
| download | rust-6a50572c51d81e0aba542f0b0e73c376c7cbb9c2.tar.gz rust-6a50572c51d81e0aba542f0b0e73c376c7cbb9c2.zip | |
Support RelWithDebInfo for lld.
| -rw-r--r-- | src/bootstrap/native.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index a751a6e3ece..40ab5d45a4b 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -653,8 +653,16 @@ impl Step for Lld { // there's probably a lot of reasons you can't do that other than this. let llvm_config_shim = env::current_exe().unwrap().with_file_name("llvm-config-wrapper"); + // Re-use the same flags as llvm to control the level of debug information + // generated for lld. + let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) { + (false, _) => "Debug", + (true, false) => "Release", + (true, true) => "RelWithDebInfo", + }; + cfg.out_dir(&out_dir) - .profile("Release") + .profile(profile) .env("LLVM_CONFIG_REAL", &llvm_config) .define("LLVM_CONFIG_PATH", llvm_config_shim) .define("LLVM_INCLUDE_TESTS", "OFF"); |
