mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Kernel: Only build with -fsanitize=* if using GCC
Clangd (CLion) was choking on some of the -fsanitize options, and since we're not building the kernel with Clang anyway, let's just disable the options for non-GCC compilers for now.
This commit is contained in:
parent
31ac93d051
commit
de52fe6156
Notes:
sideshowbarker
2024-07-18 21:59:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/de52fe6156e
1 changed files with 5 additions and 3 deletions
|
@ -297,9 +297,11 @@ set(KERNEL_FSANITIZE_FLAGS
|
|||
# "pointer-overflow"
|
||||
)
|
||||
|
||||
foreach(flag IN LISTS KERNEL_FSANITIZE_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${flag}")
|
||||
endforeach()
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
foreach(flag IN LISTS KERNEL_FSANITIZE_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${flag}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE -fno-rtti -ffreestanding -fbuiltin")
|
||||
|
|
Loading…
Reference in a new issue