Skip to content

Commit

Permalink
CMake: fix /safeseh flag
Browse files Browse the repository at this point in the history
/safeseh is only a valid linker flag when building an exe or shared lib.
Specifying when building a static library results in a warning.

Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
  • Loading branch information
dnakamura committed Nov 3, 2021
1 parent 79e5193 commit a80b811
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmake/modules/platform/toolcfg/msvc.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2017, 2019 IBM Corp. and others
# Copyright (c) 2017, 2021 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -68,7 +68,10 @@ if(OMR_ENV_DATA64)
# /NODEFAULTLIB:MSVCRTD
)
elseif(OMR_ENV_DATA32)
list(APPEND OMR_PLATFORM_LINKER_OPTIONS
list(APPEND OMR_PLATFORM_EXE_LINKER_OPTIONS
/SAFESEH
)
list(APPEND OMR_PLATFORM_SHARED_LINKER_OPTIONS
/SAFESEH
)
list(APPEND OMR_PLATFORM_SHARED_LINKER_OPTIONS
Expand Down

0 comments on commit a80b811

Please sign in to comment.