Enable -Os on all targets
This commit is contained in:
parent
feaf9ed19b
commit
c82ed5df01
@ -1,5 +1,6 @@
|
||||
function(luna_app SOURCE_FILE APP_NAME)
|
||||
add_executable(${APP_NAME} ${SOURCE_FILE})
|
||||
target_compile_options(${APP_NAME} PRIVATE -Os -Wall -Wextra -pedantic -Werror)
|
||||
add_dependencies(${APP_NAME} libc)
|
||||
target_include_directories(${APP_NAME} PRIVATE ${LUNA_BASE}/usr/include)
|
||||
install(TARGETS ${APP_NAME} DESTINATION ${LUNA_ROOT}/initrd/bin)
|
||||
|
@ -31,7 +31,8 @@ target_link_libraries(bare_libc PUBLIC luna)
|
||||
|
||||
target_include_directories(bare_libc PUBLIC include/)
|
||||
|
||||
target_compile_options(bare_libc PRIVATE -Wall -Wextra -Werror -pedantic -nostdlib -fno-exceptions -fno-rtti)
|
||||
target_compile_options(bare_libc PRIVATE -Os -Wall -Wextra -Werror -pedantic -nostdlib)
|
||||
target_compile_options(bare_libc PRIVATE -fno-exceptions -fno-rtti)
|
||||
|
||||
target_link_options(bare_libc PRIVATE -nostdlib)
|
||||
|
||||
|
@ -25,7 +25,7 @@ set(SOURCES
|
||||
|
||||
add_library(luna-freestanding ${FREESTANDING_SOURCES})
|
||||
target_compile_definitions(luna-freestanding PRIVATE USE_FREESTANDING)
|
||||
target_compile_options(luna-freestanding PRIVATE -Wall -Wextra -Werror -Wvla)
|
||||
target_compile_options(luna-freestanding PRIVATE -Os -Wall -Wextra -Werror -Wvla)
|
||||
target_compile_options(luna-freestanding PRIVATE -Wdisabled-optimization -Wformat=2 -Winit-self -Wsign-conversion)
|
||||
target_compile_options(luna-freestanding PRIVATE -Wmissing-include-dirs -Wswitch-default -Wcast-qual -Wundef)
|
||||
target_compile_options(luna-freestanding PRIVATE -Wcast-align -Wwrite-strings -Wlogical-op -Wredundant-decls -Wshadow -Wconversion)
|
||||
@ -37,7 +37,7 @@ target_include_directories(luna-freestanding PUBLIC include/)
|
||||
set_target_properties(luna-freestanding PROPERTIES CXX_STANDARD 20)
|
||||
|
||||
add_library(luna ${SOURCES})
|
||||
target_compile_options(luna PRIVATE -Wall -Wextra -Werror -Wvla)
|
||||
target_compile_options(luna PRIVATE -Os -Wall -Wextra -Werror -Wvla)
|
||||
target_compile_options(luna PRIVATE -Wdisabled-optimization -Wformat=2 -Winit-self)
|
||||
target_compile_options(luna PRIVATE -Wmissing-include-dirs -Wswitch-default -Wcast-qual -Wundef)
|
||||
target_compile_options(luna PRIVATE -Wcast-align -Wwrite-strings -Wlogical-op -Wredundant-decls -Wshadow -Wconversion)
|
||||
|
Loading…
Reference in New Issue
Block a user