diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-11 20:29:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-05 16:23:57 +0300 |
commit | 47bf754de4ec60def018284023b5baf9b90ca696 (patch) | |
tree | 3cc1d4980554eabf71992f00d51c2be2cef752c4 /intern/elbeem | |
parent | 916e51a4078b452774b2696d1daeb7286ab3f085 (diff) |
Build: disable address sanitizer for Cycles optimized kernels with GCC
It's extremely slow to compile and run, so just disable it unless
WITH_CYCLES_KERNEL_ASAN is manually enabled. For Clang it's always
enabled since that appears to work ok.
This also limits the -fno-sanitize=vptr flag to the Cycles kernel, as it
was added specifically to work around an issue there.
Differential Revision: https://developer.blender.org/D5404
Diffstat (limited to 'intern/elbeem')
-rw-r--r-- | intern/elbeem/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt index 926329be61b..383cfa66c15 100644 --- a/intern/elbeem/CMakeLists.txt +++ b/intern/elbeem/CMakeLists.txt @@ -119,4 +119,10 @@ else() add_definitions(-DPARALLEL=0) endif() +# Work around hang with GCC and ASAN. +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=vptr") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr") +endif() + blender_add_lib_nolist(bf_intern_elbeem "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") |