Comment Reproducible Build Addition

This commit is contained in:
Sarah Jamie Lewis 2023-07-06 15:46:13 -07:00
parent 1a6a57691c
commit 851210204a
1 changed files with 6 additions and 3 deletions

View File

@ -41,9 +41,10 @@ endif()
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE -Os -Wall -Werror -fno-ident -Qn)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>" -fno-ident -Qn)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
# -Os -fno-ident (optimize for size, and strip idents, don't generate a build-id, fix hash style)
target_compile_options(${TARGET} PRIVATE -Wall -Werror -Os -fno-ident)
target_link_libraries(${TARGET} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none)
endfunction()
@ -74,9 +75,11 @@ add_executable(${BINARY_NAME}
apply_standard_settings(${BINARY_NAME})
# Add dependency libraries. Add any application-specific dependencies here.
target_compile_options(${BINARY_NAME} PRIVATE -Os -fno-ident -Qn)
# -Os -fno-ident (optimize for size, and strip idents)
target_compile_options(${BINARY_NAME} PRIVATE -Os -fno-ident)
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
# -Os -fno-ident (optimize for size, and strip idents, don't generate a build-id, fix hash style)
target_link_libraries(${BINARY_NAME} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none)
# Run the Flutter tool portions of the build. This must not be removed.