diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/00-Common.cmake | 14 | ||||
-rw-r--r-- | indra/cmake/Linker.cmake | 4 |
2 files changed, 14 insertions, 4 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 21242a32be..d90a34bb6b 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -124,11 +124,20 @@ if (LINUX) add_compile_definitions( _REENTRANT - _FORTIFY_SOURCE=2 APPID=secondlife LL_IGNORE_SIGCHLD ) + if( ENABLE_ASAN ) + add_compile_options(-U_FORTIFY_SOURCE + -fsanitize=address + --param asan-stack=0 + ) + add_link_options(-fsanitize=address) + else() + add_compile_definitions( _FORTIFY_SOURCE=2 ) + endif() + add_compile_options( -fexceptions -fno-math-errno @@ -150,6 +159,7 @@ if (LINUX) set(CLANG_WARNINGS ${GCC_CLANG_COMPATIBLE_WARNINGS} # Put clang specific warning configuration here + -Wno-unknown-warning-option ) set(GCC_WARNINGS @@ -165,7 +175,7 @@ if (LINUX) -Wl,--no-undefined ) if (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Werror) + add_compile_options( -Werror ) endif (NOT GCC_DISABLE_FATAL_WARNINGS) # this stops us requiring a really recent glibc at runtime diff --git a/indra/cmake/Linker.cmake b/indra/cmake/Linker.cmake index 292aa25c57..8016842192 100644 --- a/indra/cmake/Linker.cmake +++ b/indra/cmake/Linker.cmake @@ -1,7 +1,7 @@ include_guard(GLOBAL) -if (${LINK_WITH_MOLD}) - find_program(MOLD_BIN mold REQUIRED) +if( LINK_WITH_MOLD ) + find_program(MOLD_BIN mold) if(MOLD_BIN) message(STATUS "Mold linker found: ${MOLD_BIN}. Enabling mold as active linker.") add_link_options("-fuse-ld=${MOLD_BIN}") |