aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-02 09:37:53 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit0730f0379df326d8fd0ef71793ec90cf4a020119 (patch)
tree96fedd6e123834efc36382e7b5278ddb8cd558a5 /backend/ninja
parentb62ecb7f87a4eaa66bcded62f44335aa046e05c0 (diff)
Strip release executable when using gcc/clang
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index c329c23..9ec12d3 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -1174,6 +1174,11 @@ namespace backend
ninja::NinjaArg::createRaw("-lubsan")
});
}
+ else if(config.getOptimizationLevel() == OPT_LEV_RELEASE)
+ {
+ // Strip binary
+ buildExeArgs.push_back(ninja::NinjaArg::createRaw("-s"));
+ }
// TODO: Add flag to disable -ldl and -lm (dlopen, dlclose, floor, max, ...)
#if OS_TYPE == OS_TYPE_OPENBSD