@@ -2328,38 +2328,39 @@ function Build-LLVM([Hashtable] $Platform) {
2328
2328
}
2329
2329
}
2330
2330
2331
- function Build-Sanitizers ([Hashtable ] $Platform ) {
2332
- $LLVMTargetCache = $ (Get-ProjectBinaryCache $Platform LLVM)
2333
- $LITVersionStr = $ (Invoke-Program $ (Get-PythonExecutable ) " $LLVMTargetCache \bin\llvm-lit.py" -- version)
2331
+ function Build-CompilerRuntime ([Hashtable ] $Platform ) {
2332
+ $LLVMBinaryCache = $ (Get-ProjectBinaryCache $Platform LLVM)
2333
+
2334
+ $LITVersionStr = $ (Invoke-Program $ (Get-PythonExecutable ) " $LLVMBinaryCache \bin\llvm-lit.py" -- version)
2334
2335
if (-not $ToBatch -and -not ($LITVersionStr -match " lit (\d+)\.\d+\.\d+.*" )) {
2335
2336
throw " Unexpected version string '$LITVersionStr ' output from llvm-lit.py"
2336
2337
}
2337
2338
$LLVMVersionMajor = $Matches.1
2338
- $InstallTo = " $ ( $HostPlatform .ToolchainInstallRoot ) \usr\lib\clang\ $LLVMVersionMajor "
2339
- Write-Host " Sanitizers SDK directory: $InstallTo "
2339
+
2340
+ $InstallRoot = " $ ( $HostPlatform .ToolchainInstallRoot ) \usr\lib\clang\ $LLVMVersionMajor "
2340
2341
2341
2342
Build-CMakeProject `
2342
2343
- Src $SourceCache \llvm- project\compiler- rt\lib\builtins `
2343
2344
- Bin " $ ( Get-ProjectBinaryCache $Platform ClangBuiltins) " `
2344
- - InstallTo $InstallTo `
2345
+ - InstallTo $InstallRoot `
2345
2346
- Platform $Platform `
2346
2347
- UseBuiltCompilers ASM, C, CXX `
2347
2348
- BuildTargets " install-compiler-rt" `
2348
- - Defines ( @ {
2349
- LLVM_DIR = " $LLVMTargetCache \lib\cmake\llvm" ;
2349
+ - Defines @ {
2350
+ LLVM_DIR = " $LLVMBinaryCache \lib\cmake\llvm" ;
2350
2351
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR = " YES" ;
2351
2352
COMPILER_RT_DEFAULT_TARGET_ONLY = " YES" ;
2352
- })
2353
+ }
2353
2354
2354
2355
Build-CMakeProject `
2355
2356
- Src $SourceCache \llvm- project\compiler- rt `
2356
2357
- Bin " $ ( Get-ProjectBinaryCache $Platform ClangRuntime) " `
2357
- - InstallTo $InstallTo `
2358
+ - InstallTo $InstallRoot `
2358
2359
- Platform $Platform `
2359
2360
- UseBuiltCompilers ASM, C, CXX `
2360
2361
- BuildTargets " install-compiler-rt" `
2361
2362
- Defines @ {
2362
- LLVM_DIR = " $LLVMTargetCache \lib\cmake\llvm" ;
2363
+ LLVM_DIR = " $LLVMBinaryCache \lib\cmake\llvm" ;
2363
2364
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR = " YES" ;
2364
2365
COMPILER_RT_DEFAULT_TARGET_ONLY = " YES" ;
2365
2366
COMPILER_RT_BUILD_BUILTINS = " NO" ;
@@ -3106,7 +3107,7 @@ function Build-SDK([Hashtable] $Platform) {
3106
3107
Invoke-BuildStep Build-Runtime $Platform
3107
3108
Invoke-BuildStep Build-Dispatch $Platform
3108
3109
Invoke-BuildStep Build-Foundation $Platform
3109
- Invoke-BuildStep Build-Sanitizers $Platform
3110
+ Invoke-BuildStep Build-CompilerRuntime $Platform
3110
3111
Invoke-BuildStep Build-XCTest $Platform
3111
3112
Invoke-BuildStep Build-Testing $Platform
3112
3113
}
0 commit comments