Skip to content

Commit 3c9c4c6

Browse files
hjyamauchicompnerd
andauthored
Turn off safeseh for foundation on X86. (#567)
Because lld has safeseh enabled by default and fails with a special icu data object file icudt69l_dat.obj. Co-authored-by: Saleem Abdulrasool <[email protected]>
1 parent 9e6e17e commit 3c9c4c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,10 @@ function Build-Foundation($Arch, [switch]$Test = $false) {
809809
CMAKE_INSTALL_PREFIX = "$($Arch.SDKInstallRoot)\usr";
810810
CMAKE_SYSTEM_NAME = "Windows";
811811
CMAKE_SYSTEM_PROCESSOR = $Arch.CMakeName;
812+
# Turn off safeseh for lld as it has safeseh enabled by default
813+
# and fails with an ICU data object file icudt69l_dat.obj. This
814+
# matters to X86 only.
815+
CMAKE_Swift_FLAGS = if ($Arch -eq $ArchX86) { "-Xlinker /SAFESEH:NO" } else { "" };
812816
CURL_DIR = "$LibraryRoot\curl-7.77.0\usr\lib\$ShortArch\cmake\CURL";
813817
ICU_DATA_LIBRARY_RELEASE = "$LibraryRoot\icu-69.1\usr\lib\$ShortArch\sicudt69.lib";
814818
ICU_I18N_LIBRARY_RELEASE = "$LibraryRoot\icu-69.1\usr\lib\$ShortArch\sicuin69.lib";

0 commit comments

Comments
 (0)