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