WebKit Bugzilla
Attachment 346878 Details for
Bug 188460
: [CMake] Add ENABLE_UNDEFINED_BEHAVIOR_SANITIZER to make it easier to build with UBSan
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188460.diff (text/plain), 2.08 KB, created by
Don Olmstead
on 2018-08-09 17:20:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2018-08-09 17:20:31 PDT
Size:
2.08 KB
patch
obsolete
>diff --git a/ChangeLog b/ChangeLog >index 22dfeddbb58..c8bbb6f0f65 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,12 @@ >+2018-08-09 Don Olmstead <don.olmstead@sony.com> >+ >+ [CMake] Add ENABLE_UNDEFINED_BEHAVIOR_SANITIZER to make it easier to build with UBSan >+ https://bugs.webkit.org/show_bug.cgi?id=188460 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/WebKitCompilerFlags.cmake: >+ > 2018-07-30 Thibault Saunier <tsaunier@igalia.com> > > [GStreamer] Make codecparsers optionnal >diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake >index af04e8d8db9..4cd05096528 100644 >--- a/Source/cmake/WebKitCompilerFlags.cmake >+++ b/Source/cmake/WebKitCompilerFlags.cmake >@@ -164,7 +164,7 @@ endif () > if (COMPILER_IS_GCC_OR_CLANG) > # Careful: this needs to be above where ENABLED_COMPILER_SANITIZERS is set. > # Also, it's not possible to use the normal prepend/append macros for >- # -fsanitize=address, because check_cxx_compiler_flag will report it's >+ # -fsanitize=* flags, because check_cxx_compiler_flag will report it's > # unsupported, because it causes the build to fail if not used when linking. > option(ENABLE_ADDRESS_SANITIZER "Enable address sanitizer" OFF) > if (ENABLE_ADDRESS_SANITIZER) >@@ -175,6 +175,15 @@ if (COMPILER_IS_GCC_OR_CLANG) > set(CMAKE_EXE_LINKER_FLAGS "-lpthread ${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") > set(CMAKE_SHARED_LINKER_FLAGS "-lpthread ${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") > endif () >+ >+ option(ENABLE_UNDEFINED_BEHAVIOR_SANITIZER "Enable undefined behavior sanitizer" OFF) >+ if (ENABLE_UNDEFINED_BEHAVIOR_SANITIZER) >+ WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-fno-omit-frame-pointer) >+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined") >+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") >+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined") >+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=undefined") >+ endif () > endif () > > if (NOT MSVC)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188460
: 346878 |
347015
|
347417