[SCons] Add "optimize" and "debug_symbols" options
optimize = auto|none|debug|speed|size|0|1|2|3 debug_symbol = True|False optimize == "auto" will produce: - "debug" for "debug" builds - "speed" for "release" builds
This commit is contained in:
@@ -18,11 +18,6 @@ def generate(env):
|
||||
env.Append(CCFLAGS=["-fPIC", "-Wwrite-strings"])
|
||||
env.Append(LINKFLAGS=["-Wl,-R,'$$ORIGIN'"])
|
||||
|
||||
if env["target"] == "debug":
|
||||
env.Append(CCFLAGS=["-Og", "-g"])
|
||||
elif env["target"] == "release":
|
||||
env.Append(CCFLAGS=["-O3"])
|
||||
|
||||
if env["arch"] == "x86_64":
|
||||
# -m64 and -m32 are x86-specific already, but it doesn't hurt to
|
||||
# be clear and also specify -march=x86-64. Similar with 32-bit.
|
||||
|
||||
Reference in New Issue
Block a user