Skip to content

Commit b3e82f4

Browse files
build.ps1: add more timing instrumentation for ExperimentalSDK
1 parent da00129 commit b3e82f4

File tree

1 file changed

+81
-74
lines changed

1 file changed

+81
-74
lines changed

utils/build.ps1

Lines changed: 81 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3179,98 +3179,105 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
31793179
Invoke-IsolatingEnvVars {
31803180
$env:Path = "$(Get-CMarkBinaryCache $Platform)\src;$(Get-PinnedToolchainRuntime);${env:Path}"
31813181

3182+
Record-OperationTime $Platform "Build-ExperimentalDynamicDispatch" {
3183+
Build-CMakeProject `
3184+
-Src $SourceCache\swift-corelibs-libdispatch `
3185+
-Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3186+
-InstallTo "${SDKROOT}\usr" `
3187+
-Platform $Platform `
3188+
-UseBuiltCompilers C,CXX,Swift `
3189+
-SwiftSDK "${SDKROOT}" `
3190+
-Defines @{
3191+
BUILD_SHARED_LIBS = "YES";
3192+
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
3193+
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
3194+
3195+
ENABLE_SWIFT = "YES";
3196+
}
3197+
}
3198+
Record-OperationTime $Platform "Build-ExperimentalStaticDispatch" {
3199+
Build-CMakeProject `
3200+
-Src $SourceCache\swift-corelibs-libdispatch `
3201+
-Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
3202+
-InstallTo "${SDKROOT}\usr" `
3203+
-Platform $Platform `
3204+
-UseBuiltCompilers C,CXX,Swift `
3205+
-SwiftSDK "${SDKROOT}" `
3206+
-Defines @{
3207+
BUILD_SHARED_LIBS = "NO";
3208+
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir");
3209+
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
3210+
3211+
ENABLE_SWIFT = "YES";
3212+
}
3213+
}
3214+
}
3215+
3216+
Record-OperationTime $Platform "Build-ExperimentalDynamicFoundation" {
31823217
Build-CMakeProject `
3183-
-Src $SourceCache\swift-corelibs-libdispatch `
3184-
-Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3218+
-Src $SourceCache\swift-corelibs-foundation `
3219+
-Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
31853220
-InstallTo "${SDKROOT}\usr" `
31863221
-Platform $Platform `
3187-
-UseBuiltCompilers C,CXX,Swift `
3222+
-UseBuiltCompilers ASM,C,CXX,Swift `
31883223
-SwiftSDK "${SDKROOT}" `
31893224
-Defines @{
31903225
BUILD_SHARED_LIBS = "YES";
31913226
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
3227+
CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES";
31923228
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
3193-
3194-
ENABLE_SWIFT = "YES";
3229+
ENABLE_TESTING = "NO";
3230+
3231+
FOUNDATION_BUILD_TOOLS = "NO";
3232+
CURL_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\CURL";
3233+
LibXml2_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\libxml2-2.11.5";
3234+
ZLIB_INCLUDE_DIR = "$BinaryCache\$($Platform.Triple)\usr\include";
3235+
ZLIB_LIBRARY = if ($Platform.OS -eq [OS]::Windows) {
3236+
"$BinaryCache\$($Platform.Triple)\usr\lib\zlibstatic.lib"
3237+
} else {
3238+
"$BinaryCache\$($Platform.Triple)\usr\lib\libz.a"
3239+
};
3240+
dispatch_DIR = $(Get-ProjectCMakeModules $Platform ExperimentalDynamicDispatch);
3241+
SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3242+
_SwiftFoundation_SourceDIR = "$SourceCache\swift-foundation";
3243+
_SwiftFoundationICU_SourceDIR = "$SourceCache\swift-foundation-icu";
3244+
_SwiftCollections_SourceDIR = "$SourceCache\swift-collections";
3245+
SwiftFoundation_MACRO = "$(Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros)\bin"
31953246
}
3247+
}
31963248

3249+
Record-OperationTime $Platform "Build-ExperimentalStaticFoundation" {
31973250
Build-CMakeProject `
3198-
-Src $SourceCache\swift-corelibs-libdispatch `
3199-
-Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
3251+
-Src $SourceCache\swift-corelibs-foundation `
3252+
-Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
32003253
-InstallTo "${SDKROOT}\usr" `
32013254
-Platform $Platform `
3202-
-UseBuiltCompilers C,CXX,Swift `
3203-
-SwiftSDK "${SDKROOT}" `
3255+
-UseBuiltCompilers ASM,C,CXX,Swift `
3256+
-SwiftSDK ${SDKROOT} `
32043257
-Defines @{
32053258
BUILD_SHARED_LIBS = "NO";
3259+
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
3260+
CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES";
32063261
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir");
32073262
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
3208-
3209-
ENABLE_SWIFT = "YES";
3263+
ENABLE_TESTING = "NO";
3264+
3265+
FOUNDATION_BUILD_TOOLS = if ($Platform.OS -eq [OS]::Windows) { "YES" } else { "NO" };
3266+
CURL_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\CURL";
3267+
LibXml2_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\libxml2-2.11.5";
3268+
ZLIB_INCLUDE_DIR = "$BinaryCache\$($Platform.Triple)\usr\include";
3269+
ZLIB_LIBRARY = if ($Platform.OS -eq [OS]::Windows) {
3270+
"$BinaryCache\$($Platform.Triple)\usr\lib\zlibstatic.lib"
3271+
} else {
3272+
"$BinaryCache\$($Platform.Triple)\usr\lib\libz.a"
3273+
};
3274+
dispatch_DIR = $(Get-ProjectCMakeModules $Platform ExperimentalStaticDispatch);
3275+
SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3276+
_SwiftFoundation_SourceDIR = "$SourceCache\swift-foundation";
3277+
_SwiftFoundationICU_SourceDIR = "$SourceCache\swift-foundation-icu";
3278+
_SwiftCollections_SourceDIR = "$SourceCache\swift-collections";
3279+
SwiftFoundation_MACRO = "$(Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros)\bin"
32103280
}
3211-
}
3212-
3213-
Build-CMakeProject `
3214-
-Src $SourceCache\swift-corelibs-foundation `
3215-
-Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
3216-
-InstallTo "${SDKROOT}\usr" `
3217-
-Platform $Platform `
3218-
-UseBuiltCompilers ASM,C,CXX,Swift `
3219-
-SwiftSDK "${SDKROOT}" `
3220-
-Defines @{
3221-
BUILD_SHARED_LIBS = "YES";
3222-
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
3223-
CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES";
3224-
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
3225-
ENABLE_TESTING = "NO";
3226-
3227-
FOUNDATION_BUILD_TOOLS = "NO";
3228-
CURL_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\CURL";
3229-
LibXml2_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\libxml2-2.11.5";
3230-
ZLIB_INCLUDE_DIR = "$BinaryCache\$($Platform.Triple)\usr\include";
3231-
ZLIB_LIBRARY = if ($Platform.OS -eq [OS]::Windows) {
3232-
"$BinaryCache\$($Platform.Triple)\usr\lib\zlibstatic.lib"
3233-
} else {
3234-
"$BinaryCache\$($Platform.Triple)\usr\lib\libz.a"
3235-
};
3236-
dispatch_DIR = $(Get-ProjectCMakeModules $Platform ExperimentalDynamicDispatch);
3237-
SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3238-
_SwiftFoundation_SourceDIR = "$SourceCache\swift-foundation";
3239-
_SwiftFoundationICU_SourceDIR = "$SourceCache\swift-foundation-icu";
3240-
_SwiftCollections_SourceDIR = "$SourceCache\swift-collections";
3241-
SwiftFoundation_MACRO = "$(Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros)\bin"
3242-
}
3243-
3244-
Build-CMakeProject `
3245-
-Src $SourceCache\swift-corelibs-foundation `
3246-
-Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
3247-
-InstallTo "${SDKROOT}\usr" `
3248-
-Platform $Platform `
3249-
-UseBuiltCompilers ASM,C,CXX,Swift `
3250-
-SwiftSDK ${SDKROOT} `
3251-
-Defines @{
3252-
BUILD_SHARED_LIBS = "NO";
3253-
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
3254-
CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES";
3255-
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir");
3256-
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
3257-
ENABLE_TESTING = "NO";
3258-
3259-
FOUNDATION_BUILD_TOOLS = if ($Platform.OS -eq [OS]::Windows) { "YES" } else { "NO" };
3260-
CURL_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\CURL";
3261-
LibXml2_DIR = "$BinaryCache\$($Platform.Triple)\usr\lib\cmake\libxml2-2.11.5";
3262-
ZLIB_INCLUDE_DIR = "$BinaryCache\$($Platform.Triple)\usr\include";
3263-
ZLIB_LIBRARY = if ($Platform.OS -eq [OS]::Windows) {
3264-
"$BinaryCache\$($Platform.Triple)\usr\lib\zlibstatic.lib"
3265-
} else {
3266-
"$BinaryCache\$($Platform.Triple)\usr\lib\libz.a"
3267-
};
3268-
dispatch_DIR = $(Get-ProjectCMakeModules $Platform ExperimentalStaticDispatch);
3269-
SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3270-
_SwiftFoundation_SourceDIR = "$SourceCache\swift-foundation";
3271-
_SwiftFoundationICU_SourceDIR = "$SourceCache\swift-foundation-icu";
3272-
_SwiftCollections_SourceDIR = "$SourceCache\swift-collections";
3273-
SwiftFoundation_MACRO = "$(Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros)\bin"
32743281
}
32753282
}
32763283

0 commit comments

Comments
 (0)