Skip to content

Commit

Permalink
Work around the LNK1322 issue in swift-build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hjyamauchi committed Mar 4, 2025
1 parent a172489 commit f31c45f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2557,6 +2557,12 @@ function Build-Build($Arch) {
TSC_DIR = (Get-HostProjectCMakeModules ToolsSupportCore);
SQLite3_INCLUDE_DIR = "$LibraryRoot\sqlite-3.46.0\usr\include";
SQLite3_LIBRARY = "$LibraryRoot\sqlite-3.46.0\usr\lib\SQLite3.lib";
} + if ($Arch -eq $ArchARM64) {
# Use lld to workaround the LNK1322 issue: https://github.com/swiftlang/swift/issues/79740
# FIXME(hjyamauchi) Have a real fix
@{ CMAKE_Swift_FLAGS = "-use-ld=lld-link"; }
} else {
@{}
}
}

Expand Down Expand Up @@ -3172,7 +3178,6 @@ if ($Clean) {
}
}


if (-not $SkipBuild) {
if ($EnableCaching -And (-Not (Test-SCCacheAtLeast -Major 0 -Minor 7 -Patch 4))) {
throw "Minimum required sccache version is 0.7.4"
Expand Down

0 comments on commit f31c45f

Please sign in to comment.