Skip to content

Commit fa889f3

Browse files
Replace "Android" string compares with [Platform]::Android enum
1 parent 8b115a7 commit fa889f3

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") {
@@ -1034,7 +1034,7 @@ function Build-CMakeProject {
10341034
# Add additional linker flags for generating the debug info.
10351035
Append-FlagsDefine $Defines CMAKE_SHARED_LINKER_FLAGS "/debug"
10361036
Append-FlagsDefine $Defines CMAKE_EXE_LINKER_FLAGS "/debug"
1037-
} elseif ($Platform -eq "Android") {
1037+
} elseif ($Platform -eq [Platform]::Android) {
10381038
# Use a built lld linker as the Android's NDK linker might be too
10391039
# old and not support all required relocations needed by the Swift
10401040
# runtime.
@@ -1706,7 +1706,7 @@ function Build-CURL([Platform]$Platform, $Arch) {
17061706
$ArchName = $Arch.LLVMName
17071707

17081708
$PlatformDefines = @{}
1709-
if ($Platform -eq "Android") {
1709+
if ($Platform -eq [Platform]::Android) {
17101710
$PlatformDefines += @{
17111711
HAVE_FSEEKO = "0";
17121712
}
@@ -1814,7 +1814,7 @@ function Build-CURL([Platform]$Platform, $Arch) {
18141814

18151815
function Build-Runtime([Platform]$Platform, $Arch) {
18161816
$PlatformDefines = @{}
1817-
if ($Platform -eq "Android") {
1817+
if ($Platform -eq [Platform]::Android) {
18181818
$PlatformDefines += @{
18191819
LLVM_ENABLE_LIBCXX = "YES";
18201820
SWIFT_USE_LINKER = "lld";

0 commit comments

Comments
 (0)