File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1565,6 +1565,25 @@ impl Config {
1565
1565
// the link step) with each stage.
1566
1566
config. llvm_link_shared . set ( Some ( true ) ) ;
1567
1567
}
1568
+
1569
+ // Stripping LLVM's debuginfo is only accepted when:
1570
+ // - using a shared library
1571
+ // - not explicitly requesting debuginfo
1572
+ if config. llvm_strip_debuginfo {
1573
+ if config. llvm_release_debuginfo {
1574
+ panic ! (
1575
+ "enabling `llvm.strip-debuginfo` is incompatible \
1576
+ with setting `llvm.release-debuginfo`"
1577
+ ) ;
1578
+ }
1579
+ let llvm_link_shared = config. llvm_link_shared . get ( ) . unwrap_or ( false ) ;
1580
+ if !llvm_link_shared {
1581
+ panic ! (
1582
+ "enabling `llvm.strip-debuginfo` is incompatible \
1583
+ with statically linking LLVM"
1584
+ ) ;
1585
+ }
1586
+ }
1568
1587
} else {
1569
1588
config. llvm_from_ci =
1570
1589
config. channel == "dev" && crate :: llvm:: is_ci_llvm_available ( & config, false ) ;
You can’t perform that action at this time.
0 commit comments