mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 20:27:38 +00:00
Added glibcxx_debug build variant...
...which passes flags to enable libstdc++ debug mode.
This commit is contained in:
parent
9227e277cf
commit
98620b3391
13
SConstruct
13
SConstruct
@ -39,7 +39,7 @@ def OptionalPath(key, val, env):
|
|||||||
opts.AddOptions(
|
opts.AddOptions(
|
||||||
ListOption('default_targets', 'Targets that will be built if no target is specified in command line.',
|
ListOption('default_targets', 'Targets that will be built if no target is specified in command line.',
|
||||||
"wesnoth,wesnothd,test", Split("wesnoth wesnothd campaignd cutter exploder test")),
|
"wesnoth,wesnothd,test", Split("wesnoth wesnothd campaignd cutter exploder test")),
|
||||||
EnumOption('build', 'Build variant: debug, release profile or base (no subdirectory)', "release", ["release", "debug", "profile","base"]),
|
EnumOption('build', 'Build variant: debug, release profile or base (no subdirectory)', "release", ["release", "debug", "glibcxx_debug", "profile","base"]),
|
||||||
('extra_flags_base', 'Extra compiler and linker flags to use for release builds', ""),
|
('extra_flags_base', 'Extra compiler and linker flags to use for release builds', ""),
|
||||||
('extra_flags_release', 'Extra compiler and linker flags to use for release builds', ""),
|
('extra_flags_release', 'Extra compiler and linker flags to use for release builds', ""),
|
||||||
('extra_flags_debug', 'Extra compiler and linker flags to use for debug builds', ""),
|
('extra_flags_debug', 'Extra compiler and linker flags to use for debug builds', ""),
|
||||||
@ -330,11 +330,14 @@ SConscript(dirs = Split("po doc packaging/windows"))
|
|||||||
|
|
||||||
binaries = Split("wesnoth wesnothd cutter exploder campaignd test")
|
binaries = Split("wesnoth wesnothd cutter exploder campaignd test")
|
||||||
builds = {
|
builds = {
|
||||||
"base" : dict(CXXFLAGS = "-O2"), # Don't build in subdirectory
|
"base" : dict(CXXFLAGS = "-O2"), # Don't build in subdirectory
|
||||||
"debug" : dict(CXXFLAGS = Split("-O0 -DDEBUG -ggdb3")),
|
"debug" : dict(CXXFLAGS = Split("-O0 -DDEBUG -ggdb3")),
|
||||||
"release" : dict(CXXFLAGS = "-O2"),
|
"glibcxx_debug" : dict(CPPDEFINES = Split("_GLIBCXX_DEBUG _GLIBCXX_DEBUG_PEDANTIC")),
|
||||||
"profile" : dict(CXXFLAGS = "-pg", LINKFLAGS = "-pg")
|
"release" : dict(CXXFLAGS = "-O2"),
|
||||||
|
"profile" : dict(CXXFLAGS = "-pg", LINKFLAGS = "-pg")
|
||||||
}
|
}
|
||||||
|
builds["glibcxx_debug"].update(builds["debug"])
|
||||||
|
env["extra_flags_glibcxx_debug"] = env["extra_flags_debug"]
|
||||||
build = env["build"]
|
build = env["build"]
|
||||||
|
|
||||||
env.AppendUnique(**builds[build])
|
env.AppendUnique(**builds[build])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user