summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2016-03-12 15:02:20 -0700
committerGeorge Joseph <george.joseph@fairview5.com>2016-03-13 15:11:39 -0600
commit0af6b5de620a89645372e4ac7e00bcd27221ad96 (patch)
treec500ecd1d58aebdd56b57df15687a07e07883359 /build_tools
parentb12980011abed533eea13d1d3b80faed331a1f1e (diff)
build_system: Split COMPILE_DOUBLE from DONT_OPTIMIZE
I can't ever recall actually needing the intermediate files or the checking that a double compile produces. What I CAN remember is every DONT_OPTIMIZE build needing 3 invocations of gcc instead of 1 just to do the checks and produce those intermediate files. Having said that, Richard pointed out that the reason for the double compile was that there were cases in the past where a submitted patch failed to compile because the submitter never tried it with the optimizations turned on. To get the best of both worlds, COMPILE_DOUBLE has been split into its own option. If DONT_OPTIMIZE is turned on, COMPILE_DOUBLE will also be selected BUT you can then turn it off if all you need are the debugging symbols. This way you have to make an informed decision about disabling COMPILE_DOUBLE. To allow COMPILE_DOUBLE to be both auto-selected and turned off, a new feature was added to menuselect. The <use> element can now contain an "autoselect" attribute which will turn the used member on but not create a hard dependency. The cflags.xml implementation for COMPILE_DOUBLE looks like this... <member name="DONT_OPTIMIZE" displayname="Disable Optimizations ..."> <use autoselect="yes">COMPILE_DOUBLE</use> <support_level>core</support_level> </member> <member name="COMPILE_DOUBLE" displayname="Pre-compile with ...> <depend>DONT_OPTIMIZE</depend> <support_level>core</support_level> </member> When DONT_OPTIMIZE is turned on, COMPILE_DOUBLE is turned on because of the use. When DONT_OPTIMIZE is turned off, COMPILE_DOUBLE is turned off because of the depend. When COMPILE_DOUBLE is turned on, DONT_OPTIMIZE is turned on because of the depend. When COMPILE_DOUBLE is turned off, DONT_OPTIMIZE is left as is because it only uses COMPILE_DOUBLE, it doesn't depend on it. I also made a few tweaks to the ncurses implementation to move things left a bit to allow longer descriptions. Change-Id: Id49ca930ac4b5ec4fc2d8141979ad888da7b1611
Diffstat (limited to 'build_tools')
-rw-r--r--build_tools/cflags.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/build_tools/cflags.xml b/build_tools/cflags.xml
index 566c3b08f..a06d515f3 100644
--- a/build_tools/cflags.xml
+++ b/build_tools/cflags.xml
@@ -1,5 +1,10 @@
<category name="MENUSELECT_CFLAGS" displayname="Compiler Flags" positive_output="yes" remove_on_change=".lastclean">
<member name="DONT_OPTIMIZE" displayname="Disable Optimizations by the Compiler">
+ <use autoselect="yes">COMPILE_DOUBLE</use>
+ <support_level>core</support_level>
+ </member>
+ <member name="COMPILE_DOUBLE" displayname="Pre-compile with optimizations to detect errors, then discard and recompile with DONT_OPTIMIZE. Creates intermediate .i files">
+ <depend>DONT_OPTIMIZE</depend>
<support_level>core</support_level>
</member>
<member name="DEBUG_THREADS" displayname="Enable Thread Debugging">