Remove /safeseh link option from non-msvc builds (#9744) (#9935)

This commit is contained in:
Patrik Vavercak 2021-12-08 20:44:00 +01:00 committed by GitHub
parent 9e7d52a801
commit fb30e9fdae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1228,7 +1228,7 @@ function(onnxruntime_add_shared_library_module target_name)
endif()
onnxruntime_configure_target(${target_name})
if (onnxruntime_target_platform STREQUAL "x86" AND NOT onnxruntime_BUILD_WEBASSEMBLY)
if (MSVC AND onnxruntime_target_platform STREQUAL "x86" AND NOT onnxruntime_BUILD_WEBASSEMBLY)
target_link_options(${target_name} PRIVATE /SAFESEH)
endif()
endfunction()
@ -1236,7 +1236,7 @@ endfunction()
function(onnxruntime_add_executable target_name)
add_executable(${target_name} ${ARGN})
onnxruntime_configure_target(${target_name})
if (onnxruntime_target_platform STREQUAL "x86" AND NOT onnxruntime_BUILD_WEBASSEMBLY)
if (MSVC AND onnxruntime_target_platform STREQUAL "x86" AND NOT onnxruntime_BUILD_WEBASSEMBLY)
target_link_options(${target_name} PRIVATE /SAFESEH)
endif()
endfunction()