Skip to content

Commit da55089

Browse files
authored
Merge pull request #83419 from compnerd/simplify
build.ps1: some minor simplifications
2 parents f0b4545 + 19049aa commit da55089

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

utils/build.ps1

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,21 +2503,18 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
25032503
Build-CMakeProject `
25042504
-Src $SourceCache\swift\Runtimes\Core `
25052505
-Bin $RuntimeBinaryCache `
2506-
-InstallTo "${SDKROOT}\usr" `
2506+
-InstallTo "${SDKRoot}\usr" `
25072507
-Platform $Platform `
25082508
-UseBuiltCompilers C,CXX,Swift `
25092509
-UseGNUDriver `
25102510
-Defines @{
25112511
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
25122512
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
25132513
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2514-
CMAKE_Swift_COMPILER_WORKS = "YES";
25152514
# TODO(compnerd) enforce dynamic linking of BlocksRuntime and dispatch.
25162515
CMAKE_CXX_FLAGS = $(if ($Static) { @("-Ddispatch_STATIC") } else { @() });
25172516
CMAKE_Swift_FLAGS = $(if ($Static) { @("-Xcc", "-static-libclosure") } else { @() });
25182517
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2519-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
2520-
CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES";
25212518

25222519
# NOTE(compnerd) we can get away with this currently because we only
25232520
# use the C portion of the dispatch build, which is supposed to always
@@ -2531,53 +2528,47 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
25312528
Build-CMakeProject `
25322529
-Src $SourceCache\swift\Runtimes\Overlay `
25332530
-Bin $OverlayBinaryCache `
2534-
-InstallTo "${SDKROOT}\usr" `
2531+
-InstallTo "${SDKRoot}\usr" `
25352532
-Platform $Platform `
25362533
-UseBuiltCompilers C,CXX,Swift `
25372534
-UseGNUDriver `
25382535
-Defines @{
25392536
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
25402537
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
25412538
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2542-
CMAKE_Swift_COMPILER_WORKS = "YES";
25432539
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2544-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
25452540

25462541
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
25472542
}
25482543

25492544
Build-CMakeProject `
25502545
-Src $SourceCache\swift\Runtimes\Supplemental\StringProcessing `
25512546
-Bin $StringProcessingBinaryCache `
2552-
-InstallTo "${SDKROOT}\usr" `
2547+
-InstallTo "${SDKRoot}\usr" `
25532548
-Platform $Platform `
25542549
-UseBuiltCompilers C,Swift `
25552550
-UseGNUDriver `
25562551
-Defines @{
25572552
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
25582553
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
25592554
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2560-
CMAKE_Swift_COMPILER_WORKS = "YES";
25612555
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2562-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
25632556

25642557
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
25652558
}
25662559

25672560
Build-CMakeProject `
25682561
-Src $SourceCache\swift\Runtimes\Supplemental\Synchronization `
25692562
-Bin $SynchronizationBinaryCache `
2570-
-InstallTo "${SDKROOT}\usr" `
2563+
-InstallTo "${SDKRoot}\usr" `
25712564
-Platform $Platform `
25722565
-UseBuiltCompilers C,Swift `
25732566
-UseGNUDriver `
25742567
-Defines @{
25752568
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
25762569
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
25772570
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2578-
CMAKE_Swift_COMPILER_WORKS = "YES";
25792571
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2580-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
25812572

25822573
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
25832574
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
@@ -2586,7 +2577,7 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
25862577
Build-CMakeProject `
25872578
-Src $SourceCache\swift\Runtimes\Supplemental\Distributed `
25882579
-Bin $DistributedBinaryCache `
2589-
-InstallTo "${SDKROOT}\usr" `
2580+
-InstallTo "${SDKRoot}\usr" `
25902581
-Platform $Platform `
25912582
-UseBuiltCompilers C,CXX,Swift `
25922583
-UseGNUDriver `
@@ -2595,9 +2586,7 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
25952586
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
25962587
CMAKE_CXX_FLAGS = @("-I${RuntimeBinaryCache}\include");
25972588
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2598-
CMAKE_Swift_COMPILER_WORKS = "YES";
25992589
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2600-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
26012590

26022591
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
26032592
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
@@ -2606,7 +2595,7 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
26062595
Build-CMakeProject `
26072596
-Src $SourceCache\swift\Runtimes\Supplemental\Observation `
26082597
-Bin $ObservationBinaryCache `
2609-
-InstallTo "${SDKROOT}\usr" `
2598+
-InstallTo "${SDKRoot}\usr" `
26102599
-Platform $Platform `
26112600
-UseBuiltCompilers CXX,Swift `
26122601
-UseGNUDriver `
@@ -2615,9 +2604,7 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
26152604
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
26162605
CMAKE_CXX_FLAGS = @("-I${RuntimeBinaryCache}\include");
26172606
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2618-
CMAKE_Swift_COMPILER_WORKS = "YES";
26192607
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2620-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
26212608

26222609
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
26232610
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
@@ -2626,17 +2613,15 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
26262613
Build-CMakeProject `
26272614
-Src $SourceCache\swift\Runtimes\Supplemental\Differentiation `
26282615
-Bin $DifferentiationBinaryCache `
2629-
-InstallTo "${SDKROOT}\usr" `
2616+
-InstallTo "${SDKRoot}\usr" `
26302617
-Platform $Platform `
26312618
-UseBuiltCompilers C,CXX,Swift `
26322619
-UseGNUDriver `
26332620
-Defines @{
26342621
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
26352622
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
26362623
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2637-
CMAKE_Swift_COMPILER_WORKS = "YES";
26382624
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2639-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
26402625

26412626
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
26422627
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
@@ -2978,10 +2963,8 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
29782963
BUILD_SHARED_LIBS = "NO";
29792964
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
29802965
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2981-
CMAKE_Swift_COMPILER_WORKS = "YES";
29822966
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir");
29832967
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2984-
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
29852968

29862969
ENABLE_SWIFT = "YES";
29872970
}

0 commit comments

Comments
 (0)