diff options
author | Andrew Morrow <acm@mongodb.com> | 2018-08-30 12:21:09 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2018-09-12 19:43:21 -0400 |
commit | 347e55ae0d6be484d75484039a5cc50401146b39 (patch) | |
tree | b998b59b52dbd223f01bc5474ab27b89b6adca4f /SConstruct | |
parent | f6f10f09420ce3d5676223f413607dda65223b18 (diff) | |
download | mongo-347e55ae0d6be484d75484039a5cc50401146b39.tar.gz |
SERVER-36943 Use a magic linker flag so we don't drop out debug info on darwin when using LTO
(cherry picked from commit 3adfd440e833512a7a6fcd85b9dda6c0f15b1710)
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 4db8cf12750..44148d5899c 100644 --- a/SConstruct +++ b/SConstruct @@ -2660,6 +2660,10 @@ def doConfigure(myenv): not AddToLINKFLAGSIfSupported(myenv, '-flto'): myenv.ConfError("Link time optimization requested, " "but selected compiler does not honor -flto" ) + + if myenv.TargetOSIs('darwin'): + AddToLINKFLAGSIfSupported(myenv, '-Wl,-object_path_lto,${TARGET}.lto') + else: myenv.ConfError("Don't know how to enable --lto on current toolchain") |