Skip to content

Commit 07029da

Browse files
Replace "Android" string compares with [Platform]::Android enum
1 parent 8882b93 commit 07029da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ function Build-CMakeProject {
984984
# ensure that it can be accessed from the cmake cache file.
985985
$env:NDKPATH = Get-AndroidNDKPath
986986
}
987-
if ($Platform -eq "Android") {
987+
if ($Platform -eq [Platform]::Android) {
988988
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
989989
$VSInstallPath = & $vswhere -nologo -latest -products * -property installationPath
990990
if (Test-Path "${VSInstallPath}\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin") {
@@ -1033,7 +1033,7 @@ function Build-CMakeProject {
10331033
# Add additional linker flags for generating the debug info.
10341034
Append-FlagsDefine $Defines CMAKE_SHARED_LINKER_FLAGS "/debug"
10351035
Append-FlagsDefine $Defines CMAKE_EXE_LINKER_FLAGS "/debug"
1036-
} elseif ($Platform -eq "Android") {
1036+
} elseif ($Platform -eq [Platform]::Android) {
10371037
# Use a built lld linker as the Android's NDK linker might be too
10381038
# old and not support all required relocations needed by the Swift
10391039
# runtime.
@@ -1709,7 +1709,7 @@ function Build-CURL([Platform]$Platform, $Arch) {
17091709
$ArchName = $Arch.LLVMName
17101710

17111711
$PlatformDefines = @{}
1712-
if ($Platform -eq "Android") {
1712+
if ($Platform -eq [Platform]::Android) {
17131713
$PlatformDefines += @{
17141714
HAVE_FSEEKO = "0";
17151715
}
@@ -1817,7 +1817,7 @@ function Build-CURL([Platform]$Platform, $Arch) {
18171817

18181818
function Build-Runtime([Platform]$Platform, $Arch) {
18191819
$PlatformDefines = @{}
1820-
if ($Platform -eq "Android") {
1820+
if ($Platform -eq [Platform]::Android) {
18211821
$PlatformDefines += @{
18221822
LLVM_ENABLE_LIBCXX = "YES";
18231823
SWIFT_USE_LINKER = "lld";

0 commit comments

Comments
 (0)