From 0730f0379df326d8fd0ef71793ec90cf4a020119 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 2 Oct 2018 09:37:53 +0200 Subject: Strip release executable when using gcc/clang --- backend/ninja/Ninja.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backend') 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 -- cgit v1.2.3