Skip to content

Commit ebeaa00

Browse files
[windows][toolchain] Enable sccache for Clang
We need sccache 0.7.4 or newer for clang support
1 parent 07029da commit ebeaa00

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

utils/build.ps1

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,18 +1043,21 @@ function Build-CMakeProject {
10431043
}
10441044
}
10451045

1046-
if ($UseMSVCCompilers.Contains("C")) {
1047-
TryAdd-KeyValue $Defines CMAKE_C_COMPILER cl
1048-
if ($EnableCaching) {
1046+
if ($EnableCaching) {
1047+
if ($UseMSVCCompilers.Contains("C") -Or $UsePinnedCompilers.Contains("C")) {
10491048
TryAdd-KeyValue $Defines CMAKE_C_COMPILER_LAUNCHER sccache
10501049
}
1050+
if ($UseMSVCCompilers.Contains("CXX") -Or $UsePinnedCompilers.Contains("CXX")) {
1051+
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER_LAUNCHER sccache
1052+
}
1053+
}
1054+
1055+
if ($UseMSVCCompilers.Contains("C")) {
1056+
TryAdd-KeyValue $Defines CMAKE_C_COMPILER cl
10511057
Append-FlagsDefine $Defines CMAKE_C_FLAGS $CFlags
10521058
}
10531059
if ($UseMSVCCompilers.Contains("CXX")) {
10541060
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER cl
1055-
if ($EnableCaching) {
1056-
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER_LAUNCHER sccache
1057-
}
10581061
Append-FlagsDefine $Defines CMAKE_CXX_FLAGS $CXXFlags
10591062
}
10601063
if ($UsePinnedCompilers.Contains("ASM") -Or $UseBuiltCompilers.Contains("ASM")) {

0 commit comments

Comments
 (0)