aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-07 14:22:48 -0400
committerJack Lloyd <[email protected]>2018-04-07 14:22:48 -0400
commit65afee3f1220960c0049a7ec21a97c69c60bb68f (patch)
tree4fcef4b33b3de33820fff950a62a4ec021e60bdb /src/build-data
parentf70ca7111ef3d6688ae77ded1b20a48497aa2936 (diff)
Add sanitizer-specific optimization flags
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/cc/clang.txt1
-rw-r--r--src/build-data/cc/gcc.txt5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index 817a0610c..d8c028191 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -8,6 +8,7 @@ warning_flags "-Wall -Wextra -Wpedantic -Wshadow -Wstrict-aliasing -Wstrict-over
maintainer_warning_flags "-Wunreachable-code -Wdocumentation -Qunused-arguments -Werror -Wno-error=unused-parameter -Wno-error=unreachable-code"
optimization_flags "-O3"
+sanitizer_optimization_flags "-O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer"
size_optimization_flags "-Os"
<sanitizers>
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 7aeb390e1..0b12e00bc 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -10,6 +10,7 @@ warning_flags "-Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing
maintainer_warning_flags "-Wstrict-overflow=5 -Wold-style-cast -Wsuggest-override -Wshadow -Werror -Wno-error=strict-overflow"
optimization_flags "-O3"
+sanitizer_optimization_flags "-O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer"
size_optimization_flags "-Os"
shared_flags "-fPIC"
@@ -69,10 +70,10 @@ arm32:neon -> "-mfpu=neon"
arm64:neon -> ""
</isa_flags>
-<cpu_flags>
+<cpu_flags_no_debug>
x86_32 -> "-momit-leaf-frame-pointer"
x86_64 -> "-momit-leaf-frame-pointer"
-</cpu_flags>
+</cpu_flags_no_debug>
# Flags set here are included at compile and link time
<mach_abi_linking>