Skip to content

Commit be89a85

Browse files
committed
utils: Do not set the Androic C/C++ compilers
Due to a bug in CMake, the `project()` invocation for Android projects always overrides the `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` passed on the command line with the compilers from the NDK installation. Since the values we passed on the command line were not taking effect, these changes remove them from the cmake invocation. This fixes incremental Android builds.
1 parent 663ec93 commit be89a85

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

utils/build.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,12 +1520,6 @@ function Build-CMakeProject {
15201520
}
15211521

15221522
if ($UseC) {
1523-
$CC = if ($UseBuiltCompilers.Contains("C")) {
1524-
[IO.Path]::Combine((Get-ProjectBinaryCache $BuildPlatform Compilers), "bin", "clang.exe")
1525-
} else {
1526-
Join-Path -Path $AndroidPrebuiltRoot -ChildPath "bin\clang.exe"
1527-
}
1528-
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER $CC
15291523
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_TARGET $Platform.Triple
15301524
# FIXME(compnerd) why is this needed?
15311525
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_WORKS YES
@@ -1538,12 +1532,6 @@ function Build-CMakeProject {
15381532
}
15391533

15401534
if ($UseCXX) {
1541-
$CXX = if ($UseBuiltCompilers.Contains("CXX")) {
1542-
[IO.Path]::Combine((Get-ProjectBinaryCache $BuildPlatform Compilers), "bin", "clang++.exe")
1543-
} else {
1544-
Join-Path -Path $AndroidPrebuiltRoot -ChildPath "bin\clang++.exe"
1545-
}
1546-
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER $CXX
15471535
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_TARGET $Platform.Triple
15481536
# FIXME(compnerd) why is this needed?
15491537
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_WORKS YES

0 commit comments

Comments
 (0)