Preserve optimization setting for sanitizer build

This commit is contained in:
Jon Siwek 2020-01-07 20:58:19 -08:00
parent 0c55b01ec9
commit 3273169385
5 changed files with 22 additions and 10 deletions

View file

@ -1,4 +1,8 @@
3.1.0-dev.360 | 2020-01-07 20:58:19 -0800
* Preserve optimization setting for sanitizer build (Jon Siwek, Corelight)
3.1.0-dev.359 | 2020-01-06 16:40:55 -0800
* Fix build warning in X509 plugin (Tim Wojtulewicz, Corelight)

View file

@ -130,12 +130,20 @@ if ( ZEEK_SANITIZERS )
set(_sanitizer_flags "${_sanitizer_flags} -fno-omit-frame-pointer")
set(_sanitizer_flags "${_sanitizer_flags} -fno-optimize-sibling-calls")
if ( NOT DEFINED ENV{NO_OPTIMIZATIONS} )
if ( NOT DEFINED ZEEK_SANITIZER_OPTIMIZATIONS )
if ( DEFINED ENV{NO_OPTIMIZATIONS} )
# Using -O1 is generally the suggestion to get more reasonable
# performance. The one downside is it that the compiler may optimize out
# code that otherwise generates an error/leak in a -O0 build, but that
# should be rare and users mostly will not be running unoptimized builds
# in production anyway.
# performance. The one downside is it that the compiler may
# optimize out code that otherwise generates an error/leak in a -O0
# build, but that should be rare and users mostly will not be
# running unoptimized builds in production anyway.
set(ZEEK_SANITIZER_OPTIMIZATIONS false CACHE INTERNAL "" FORCE)
else ()
set(ZEEK_SANITIZER_OPTIMIZATIONS true CACHE INTERNAL "" FORCE)
endif ()
endif ()
if ( ZEEK_SANITIZER_OPTIMIZATIONS )
set(_sanitizer_flags "${_sanitizer_flags} -O1")
endif ()

View file

@ -1 +1 @@
3.1.0-dev.359
3.1.0-dev.360

@ -1 +1 @@
Subproject commit a31a5260611528d4d1dd31fb921f92e35a7004b5
Subproject commit 2854e3e30810673fd6b9200321fa4ada364c559b

2
doc

@ -1 +1 @@
Subproject commit 60ff40641a4024d1d172572317ddb30435046d51
Subproject commit 3bd1c12b9e2810b2cbe5e05629ddc59dd83d9d36