Changeset 228134 in webkit
- Timestamp:
- Feb 5, 2018 3:23:28 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r227944 r228134 1 2018-02-05 Michael Catanzaro <mcatanzaro@igalia.com> 2 3 [CMake] Add ENABLE_ADDRESS_SANITIZER to make it easier to build with asan support 4 https://bugs.webkit.org/show_bug.cgi?id=182400 5 6 Reviewed by Konstantin Tokarev. 7 8 * Source/cmake/OptionsGTK.cmake: 9 * Source/cmake/WebKitCompilerFlags.cmake: 10 1 11 2018-01-31 Michael Catanzaro <mcatanzaro@igalia.com> 2 12 -
trunk/Source/cmake/OptionsGTK.cmake
r227788 r228134 356 356 endif () 357 357 358 # https://bugs.webkit.org/show_bug.cgi?id=182247 359 if (ENABLED_COMPILER_SANITIZERS) 360 set(ENABLE_INTROSPECTION OFF) 361 endif () 362 358 363 # Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building. 359 364 if (CMAKE_CROSSCOMPILING) -
trunk/Source/cmake/WebKitCompilerFlags.cmake
r226945 r228134 156 156 endif () 157 157 158 if (COMPILER_IS_GCC_OR_CLANG) 159 # Careful: this needs to be above where ENABLED_COMPILER_SANITIZERS is set. 160 # Also, it's not possible to use the normal prepend/append macros for 161 # -fsanitize=address, because check_cxx_compiler_flag will report it's 162 # unsupported, because it causes the build to fail if not used when linking. 163 option(ENABLE_ADDRESS_SANITIZER "Enable address sanitizer" OFF) 164 if (ENABLE_ADDRESS_SANITIZER) 165 WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-fno-omit-frame-pointer 166 -fno-optimize-sibling-calls) 167 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") 168 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") 169 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT} ${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") 170 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT} ${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") 171 endif () 172 endif () 158 173 159 174 if (NOT MSVC)
Note: See TracChangeset
for help on using the changeset viewer.