mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 15:05:19 +00:00
Set noexecstack CXX link flags for wamrc (#1303)
Set noexecstack CXX link flags for wamrc to avoid generating binary with exec stack.
This commit is contained in:
parent
0ec27af9df
commit
9d689b3a22
|
@ -226,6 +226,7 @@ if (NOT MSVC)
|
||||||
endif()
|
endif()
|
||||||
if (NOT (MSVC OR CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang"))
|
if (NOT (MSVC OR CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang"))
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,noexecstack,-z,relro,-z,now")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,noexecstack,-z,relro,-z,now")
|
||||||
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,noexecstack,-z,relro,-z,now")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# We disable these flags by default to stay the same with wasm runtime
|
# We disable these flags by default to stay the same with wasm runtime
|
||||||
|
|
Loading…
Reference in New Issue
Block a user