@@ -2539,6 +2539,10 @@ function Build-System($Arch) {
2539
2539
}
2540
2540
2541
2541
function Build-Build ($Arch ) {
2542
+ # Use lld to workaround the ARM64 LNK1322 issue: https://github.com/swiftlang/swift/issues/79740
2543
+ # FIXME(hjyamauchi) Have a real fix
2544
+ $ArchSpecificOptions = if ($Arch -eq $ArchARM64 ) { @ { CMAKE_Swift_FLAGS = " -use-ld=lld-link" ; } } else { @ {} }
2545
+
2542
2546
Build-CMakeProject `
2543
2547
- Src $SourceCache \swift- build `
2544
2548
- Bin (Get-HostProjectBinaryCache Build) `
@@ -2547,7 +2551,7 @@ function Build-Build($Arch) {
2547
2551
- Platform Windows `
2548
2552
- UseBuiltCompilers C, CXX, Swift `
2549
2553
- SwiftSDK (Get-SwiftSDK Windows) `
2550
- - Defines @ {
2554
+ - Defines ( @ {
2551
2555
BUILD_SHARED_LIBS = " YES" ;
2552
2556
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2553
2557
ArgumentParser_DIR = (Get-HostProjectCMakeModules ArgumentParser);
@@ -2557,7 +2561,7 @@ function Build-Build($Arch) {
2557
2561
TSC_DIR = (Get-HostProjectCMakeModules ToolsSupportCore);
2558
2562
SQLite3_INCLUDE_DIR = " $LibraryRoot \sqlite-3.46.0\usr\include" ;
2559
2563
SQLite3_LIBRARY = " $LibraryRoot \sqlite-3.46.0\usr\lib\SQLite3.lib" ;
2560
- }
2564
+ } + $ArchSpecificOptions )
2561
2565
}
2562
2566
2563
2567
function Build-ToolsSupportCore ($Arch ) {
@@ -3172,7 +3176,6 @@ if ($Clean) {
3172
3176
}
3173
3177
}
3174
3178
3175
-
3176
3179
if (-not $SkipBuild ) {
3177
3180
if ($EnableCaching -And (-Not (Test-SCCacheAtLeast - Major 0 - Minor 7 - Patch 4 ))) {
3178
3181
throw " Minimum required sccache version is 0.7.4"
0 commit comments