Commits
Juris Lambda authored 066ff8cab0e
....I..... [DEV-3919] add debug and release build profiles These profiles enable setting the compiler and compiler flags for GCC and Clang to serve as quality controls in debug (development) and release builds. These are loosely based on the set of flags set in the build-backend.xml ant configuration, discarding redundant (those already enabled by -Wall or -Wextra) and erroneous flags (-pedantic). The debug profiles disable optimizations, set aggressive debug symbol generation (including pre-processor directive information), and flags for code construct correctness, as well as detecting subtle errors that will rear their heads only when the bug manifests. The release profiles are trimmed down versions, enabling speed optimizations, basic debug information generation, and a few flags to catch errors that will manifest as bugs in runtime. Generally, building releases isn't the time to catch bugs -- that's much too late, but some may be so egregious that we shouldn't silence them ever. This is just a starting list, and I expect these to changes (mostly being expanded) as time goes on and we find more niche uses. The users can feed these when generating the builds system (configure) by setting the CONFIG_SITE environment variable with the path to these profiles (multiple may be specified, separating them with the system path separator). These configurations only set the compiler and/or the flags if they've not already been specified in the environment by the user, and it is the users responsibility to select the correct profile for their compiler (i.e. setting CC=clang and then using the gcc-debug profile is an error on the users part). Setting CFLAGS in the environment and then using a profile is pretty useless, but I do expect users may want to test builds against different versions of the same compiler (say gcc3, gcc4 and whatnot).