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 5 additions and 3 deletions
Showing only changes of commit 3d478b56a3 - 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 -Wall -Werror)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_options(${TARGET} PUBLIC -Os -Wall -Werror -fno-ident -Qn)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>" -fno-ident -Qn)
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
target_link_libraries(${TARGET} PUBLIC -Qn -Os -Wl,--hash-style=gnu,--build-id=none)
endfunction()
# Flutter library and tool build rules.
@ -73,9 +74,10 @@ add_executable(${BINARY_NAME}
apply_standard_settings(${BINARY_NAME})
# Add dependency libraries. Add any application-specific dependencies here.
target_compile_options(${BINARY_NAME} PUBLIC -Os -fno-ident -Qn)
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
target_link_libraries(${BINARY_NAME} PRIVATE -Wl,--hash-style=gnu)
target_link_libraries(${BINARY_NAME} PUBLIC -Qn -Os -Wl,--hash-style=gnu,--build-id=none)
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)