Add STRICT compile flag.
This commit is contained in:
parent
52377a980c
commit
cbf5643974
@ -17,6 +17,7 @@ opts.AddVariables(
|
|||||||
("RANLIB", "Archiver Indexer"),
|
("RANLIB", "Archiver Indexer"),
|
||||||
("BUILDTYPE", "Build type (RELEASE, DEBUG, or PERF)", "RELEASE"),
|
("BUILDTYPE", "Build type (RELEASE, DEBUG, or PERF)", "RELEASE"),
|
||||||
("VERBOSE", "Show full build information (0 or 1)", "0"),
|
("VERBOSE", "Show full build information (0 or 1)", "0"),
|
||||||
|
("STRICT", "Strict error checking (0 or 1)", "0"),
|
||||||
("NUMCPUS", "Number of CPUs to use for build (0 means auto).", "0"),
|
("NUMCPUS", "Number of CPUs to use for build (0 means auto).", "0"),
|
||||||
("WITH_GPROF", "Include gprof profiling (0 or 1).", "0"),
|
("WITH_GPROF", "Include gprof profiling (0 or 1).", "0"),
|
||||||
("PREFIX", "Installation target directory.", "#pxelinux"),
|
("PREFIX", "Installation target directory.", "#pxelinux"),
|
||||||
@ -59,8 +60,11 @@ env.Append(CFLAGS = [ "-Wshadow", "-Wno-typedef-redefinition" ])
|
|||||||
#env.Append(CXXFLAGS = [ "-Wno-non-template-friend", "-Woverloaded-virtual",
|
#env.Append(CXXFLAGS = [ "-Wno-non-template-friend", "-Woverloaded-virtual",
|
||||||
# "-Wcast-qual", "-Wcast-align", "-Wconversion",
|
# "-Wcast-qual", "-Wcast-align", "-Wconversion",
|
||||||
# "-Weffc++", "-std=c++0x", "-Werror" ])
|
# "-Weffc++", "-std=c++0x", "-Werror" ])
|
||||||
env.Append(CPPFLAGS = [ "-fno-builtin", "-fno-stack-protector",
|
env.Append(CPPFLAGS = [ "-fno-builtin", "-fno-stack-protector" ])
|
||||||
"-Wformat=2", "-Wmissing-format-attribute" ])
|
|
||||||
|
if (env["STRICT"] == "1"):
|
||||||
|
env.Append(CPPFLAGS = [ "-Wformat=2", "-Wmissing-format-attribute",
|
||||||
|
"-Wthread-safety", "-Wwrite-strings" ])
|
||||||
|
|
||||||
if env["WITH_GPROF"] == "1":
|
if env["WITH_GPROF"] == "1":
|
||||||
env.Append(CPPFLAGS = [ "-pg" ])
|
env.Append(CPPFLAGS = [ "-pg" ])
|
||||||
|
Loading…
Reference in New Issue
Block a user