kernel: Build with optimizations only in debug mode
This commit is contained in:
parent
36e48b2ad2
commit
8b712b04c2
@ -74,8 +74,6 @@ target_link_libraries(moon luna-freestanding)
|
||||
|
||||
target_compile_definitions(moon PRIVATE IN_MOON)
|
||||
|
||||
target_compile_options(moon PRIVATE -Os)
|
||||
|
||||
target_compile_options(moon PRIVATE -Wall -Wextra -Werror -Wvla -Wsign-conversion)
|
||||
target_compile_options(moon PRIVATE -Wdisabled-optimization -Wformat=2 -Winit-self)
|
||||
target_compile_options(moon PRIVATE -Wmissing-include-dirs -Wswitch-default -Wcast-qual -Wundef)
|
||||
@ -94,6 +92,8 @@ if(MOON_DEBUG_SYMBOLS)
|
||||
message(STATUS "Building Moon with debug symbols")
|
||||
target_compile_options(moon PRIVATE -ggdb)
|
||||
include(debug.cmake)
|
||||
else()
|
||||
target_compile_options(moon PRIVATE -Os)
|
||||
endif()
|
||||
|
||||
target_link_options(moon PRIVATE -lgcc -Wl,--build-id=none -z max-page-size=0x1000 -mcmodel=kernel)
|
||||
|
Loading…
Reference in New Issue
Block a user