SCons: Strip symbol table for builds with `debug_symbols=no`
This is equivalent to calling `strip` on the resulting binary, which is what we do for official builds. This applies for GCC/Clang. For MSVC `/DEBUG:NONE` should already be the default.
This commit is contained in:
parent
1e3919c409
commit
01ae54615e
|
@ -544,6 +544,12 @@ if selected_platform in platform_list:
|
||||||
env.Append(CCFLAGS=["-g3"])
|
env.Append(CCFLAGS=["-g3"])
|
||||||
else:
|
else:
|
||||||
env.Append(CCFLAGS=["-g2"])
|
env.Append(CCFLAGS=["-g2"])
|
||||||
|
else:
|
||||||
|
if methods.using_clang(env) and not methods.is_vanilla_clang(env):
|
||||||
|
# Apple Clang, its linker doesn't like -s.
|
||||||
|
env.Append(LINKFLAGS=["-Wl,-S", "-Wl,-x", "-Wl,-dead_strip"])
|
||||||
|
else:
|
||||||
|
env.Append(LINKFLAGS=["-s"])
|
||||||
|
|
||||||
if env["optimize"] == "speed":
|
if env["optimize"] == "speed":
|
||||||
env.Append(CCFLAGS=["-O3"])
|
env.Append(CCFLAGS=["-O3"])
|
||||||
|
|
Loading…
Reference in New Issue