Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Meel <ankitm>2020-09-15 23:46:15 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-09-15 23:48:59 +0300
commita4c5811e21271d0f26e0534f25800059c198982d (patch)
tree9fb5129ac931636fc98c2cfd30b7a70a7e08aa96 /build_files
parent84032fd1108b29d270e51d890f0303f78b6962c2 (diff)
ASan/macOS: fix incomplete C/CXX compiler flags.
While testing for {rB40dcf686f04f}, compiler flags got mixed up and non-working ASan configuration was committed. Platform file, which is `include`d after the `CMAKE_C_FLAGS_DEBUG` etc., are set, overwrites those flags instead of appending to them. To fix this, `PLATFORM_CFLAGS` is used to pass the `-fsanitize=*` flags to the C/C++ compiler. Tested on fresh build using both Xcode and Ninja, with & without ccache. Also silence a clang warning for multi-config generators: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=object-size [-Winvalid-command-line-argument] Reviewed By: brecht Differential Revision: https://developer.blender.org/D8879
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_apple.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 822110cb88f..c16fa4b2e30 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -190,7 +190,7 @@ if(SYSTEMSTUBS_LIBRARY)
list(APPEND PLATFORM_LINKLIBS SystemStubs)
endif()
-set(PLATFORM_CFLAGS "-pipe -funsigned-char")
+set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -pipe -funsigned-char")
set(PLATFORM_LINKFLAGS
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore"
)