diff options
author | Jack Lloyd <[email protected]> | 2016-11-03 11:52:32 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-03 11:52:32 -0400 |
commit | b1021ca76bb3c47b1b520421ccece38d772e5907 (patch) | |
tree | 7991dd83c4ab3d443b2d34c6a8d3bdaaf08e352c /src | |
parent | 277b4f703ba6354a37b5d12adebfc4f726cc72af (diff) |
Add new configure argument --optimize-for-size
Uses -Os for GCC/Clang/ICC, /O1 for MSVC.
Might be used in the future to control compile time features also
(eg using a large precomputed table, vs not). Does not have any
influence on module selection, just informs the build that a smaller
binary is preferable.
[ci skip]
Diffstat (limited to 'src')
-rw-r--r-- | src/build-data/cc/clang.txt | 1 | ||||
-rw-r--r-- | src/build-data/cc/gcc.txt | 1 | ||||
-rw-r--r-- | src/build-data/cc/icc.txt | 1 | ||||
-rw-r--r-- | src/build-data/cc/msvc.txt | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt index 8c5baf7ca..c4a85658f 100644 --- a/src/build-data/cc/clang.txt +++ b/src/build-data/cc/clang.txt @@ -16,6 +16,7 @@ maintainer_warning_flags "-Qunused-arguments -Werror -Wno-error=unused-parameter compile_flags "-c" debug_info_flags "-g" optimization_flags "-O3" +size_optimization_flags "-Os" #sanitizer_flags "-fsanitize=address,undefined -fsanitize-coverage=edge,indirect-calls,8bit-counters -fno-sanitize-recover=undefined" sanitizer_flags "-fsanitize=address,undefined" diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index b086583ff..b88454ce6 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -17,6 +17,7 @@ maintainer_warning_flags "-Wold-style-cast -Wsuggest-override -Wshadow -Werror - compile_flags "-c" debug_info_flags "-g" optimization_flags "-O3" +size_optimization_flags "-Os" shared_flags "-fPIC" coverage_flags "--coverage" diff --git a/src/build-data/cc/icc.txt b/src/build-data/cc/icc.txt index 084d2a4f2..f1b7e5a15 100644 --- a/src/build-data/cc/icc.txt +++ b/src/build-data/cc/icc.txt @@ -10,6 +10,7 @@ add_lib_option -l compile_flags "-c" debug_info_flags "-g" optimization_flags "-O2" +size_optimization_flags "-Os" lang_flags "-std=c++0x" warning_flags "-w1" diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index 8231c0429..c1b820b91 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -11,6 +11,7 @@ add_lib_option "" compile_flags "/nologo /c" optimization_flags "/O2" +size_optimization_flags "/O1" # for debug info in the object file: #debug_info_flags "/Z7" |