mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Add hardening linker options.
PiperOrigin-RevId: 347367335 Change-Id: Ia7d707bd3e7e58021fc3bb14df13a9f06c5e2735
This commit is contained in:
parent
c3ac45be3e
commit
8924b63d5a
|
@ -60,6 +60,7 @@ add_compile_options(-fno-exceptions)
|
||||||
|
|
||||||
if(SAPI_HARDENED_SOURCE)
|
if(SAPI_HARDENED_SOURCE)
|
||||||
add_compile_options(-fstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2)
|
add_compile_options(-fstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2)
|
||||||
|
add_link_options(-Wl,-z,relro -Wl,-z,now)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Make Bazel-style includes work
|
# Make Bazel-style includes work
|
||||||
|
|
Loading…
Reference in New Issue
Block a user