mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 23:14:18 +03:00
Additional security flags for Linux builds
This commit is contained in:
parent
188a58dd7d
commit
e087f6f21c
@ -30,8 +30,15 @@ endif()
|
|||||||
function(APPLY_STANDARD_SETTINGS TARGET)
|
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||||
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||||
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
||||||
|
target_compile_options(${TARGET} PRIVATE -fstack-protector-all)
|
||||||
|
target_compile_options(${TARGET} PRIVATE -fpie)
|
||||||
|
target_compile_options(${TARGET} PRIVATE -fpic)
|
||||||
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||||
|
target_link_options(${TARGET} PRIVATE -fstack-protector-all)
|
||||||
|
target_link_options(${TARGET} PRIVATE -pie)
|
||||||
|
target_link_options(${TARGET} PRIVATE -Wl,-z,noexecstack)
|
||||||
|
target_link_options(${TARGET} PRIVATE -Wl,-z,relro,-z,now)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||||
|
Loading…
Reference in New Issue
Block a user