Reduce Build Variance (Path to Reproducible Builds) #692
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue