Skip to content

Commit 7f37f6a

Browse files
committed
add llvm.strip-debuginfo config
to strip the debuginfo present libLLVM.so, when applicable (on linux, when llvm.link-shared is true, when llvm.release-debuginfo is false)
1 parent 89acdae commit 7f37f6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ pub struct Config {
173173
pub llvm_optimize: bool,
174174
pub llvm_thin_lto: bool,
175175
pub llvm_release_debuginfo: bool,
176+
pub llvm_strip_debuginfo: bool,
176177
pub llvm_static_stdcpp: bool,
177178
/// `None` if `llvm_from_ci` is true and we haven't yet downloaded llvm.
178179
#[cfg(not(test))]
@@ -823,6 +824,7 @@ define_config! {
823824
optimize: Option<bool> = "optimize",
824825
thin_lto: Option<bool> = "thin-lto",
825826
release_debuginfo: Option<bool> = "release-debuginfo",
827+
strip_debuginfo: Option<bool> = "strip-debuginfo",
826828
assertions: Option<bool> = "assertions",
827829
tests: Option<bool> = "tests",
828830
plugins: Option<bool> = "plugins",
@@ -1511,6 +1513,7 @@ impl Config {
15111513
config.llvm_clang = llvm.clang.unwrap_or(false);
15121514
config.llvm_enable_warnings = llvm.enable_warnings.unwrap_or(false);
15131515
config.llvm_build_config = llvm.build_config.clone().unwrap_or(Default::default());
1516+
config.llvm_strip_debuginfo = llvm.strip_debuginfo.unwrap_or(false);
15141517

15151518
let asserts = llvm_assertions.unwrap_or(false);
15161519
config.llvm_from_ci = match llvm.download_ci_llvm {
@@ -1552,6 +1555,7 @@ impl Config {
15521555
check_ci_llvm!(llvm.clang);
15531556
check_ci_llvm!(llvm.build_config);
15541557
check_ci_llvm!(llvm.plugins);
1558+
check_ci_llvm!(llvm.strip_debuginfo);
15551559
}
15561560

15571561
// NOTE: can never be hit when downloading from CI, since we call `check_ci_llvm!(thin_lto)` above.

0 commit comments

Comments
 (0)