Reduce Build Variance (Path to Reproducible Builds) #692

Merged
sarah merged 6 commits from repbuilds into trunk 2023-07-07 01:44:21 +00:00
1 changed files with 6 additions and 3 deletions
Showing only changes of commit 851210204a - Show all commits

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.