mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +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
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…
Add table
Add a link
Reference in a new issue