-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utils: support building android SDKs on Windows #72014
Conversation
This adds the ability to build the Android SDKs as part of the Windows build.
utils/build.ps1
Outdated
@@ -629,12 +724,30 @@ function Build-CMakeProject { | |||
# Add additional defines (unless already present) | |||
$Defines = $Defines.Clone() | |||
|
|||
# TODO(compnerd) clean up these and formalise this selection | |||
if ($Platform -eq "Android") { | |||
$env:Path = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;${env:Path}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the trick I suggested with Isolate-EnvVars
and Invoke-VsDevShell
not work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to try to implement them. Diff welcome of course :)
ICU_DATA_LIBRARY_RELEASE = "$LibraryRoot\icu-69.1\usr\lib\$Platform\$ShortArch\sicudt69.lib"; | ||
ICU_I18N_LIBRARY_RELEASE = "$LibraryRoot\icu-69.1\usr\lib\$Platform\$ShortArch\sicuin69.lib"; | ||
ICU_DATA_LIBRARY_RELEASE = if ($Platform -eq "Windows") { | ||
"$LibraryRoot\icu-69.1\usr\lib\$Platform\$ShortArch\sicudt69.lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The $LibraryRoot\icu-69.1\usr\lib\$Platform\$ShortArch
prefix is worth extracting before this block to keep it looking line just a set of assignments
c22f85f
to
41533ef
Compare
e0c89db
to
bb92d76
Compare
adding latest changes today |
@compnerd @tristanlabelle made some updates. could you take another look please? also updated foundation - swiftlang/swift-corelibs-foundation#4889 |
@compnerd addressed your review comments |
@swift-ci please tst |
@swift-ci please test |
@swift-ci please build toolchain |
@swift-ci please test windows platform |
1 similar comment
@swift-ci please test windows platform |
@swift-ci please test windows platform |
…dSDKs are specified when running build.ps1
@swift-ci please test windows platform |
@swift-ci please build windows toolchain |
@swift-ci please test |
@swift-ci please build toolchain |
@swift-ci please test |
@swift-ci please test source compatibility |
This is ready! |
@swift-ci please test |
@swift-ci please build toolchain |
utils/build.ps1
Outdated
@@ -334,7 +334,7 @@ function Get-InstallDir($Arch) { | |||
return "$ImageRoot\$ProgramFilesName\Swift" | |||
} | |||
|
|||
function Get-HostSwiftSDK() { | |||
function Get-BuildSwiftSDK() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, this is the host ... I was wrong. I'm confused, why are we not passing in the Arch
for the host arch sdk? Could we not cross-compile to more than one arch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because there's only one host arch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, this is the host SDK for the toolchain, not an arbitrary host SDK. I think that generalising this to Get-SwiftSDK($Arch)
might be nice as it currently makes me think that it is getting the Swift SDK for a particular host (which is true, it's just that the particular host happens to be the host that we are building the toolchain for). But, lets leave that for a follow up, I'd like to get this in.
@swift-ci please test |
@swift-ci please build toolchain |
@swift-ci please test source compatibility |
utils: support building android SDKs on Windows
utils: support building android SDKs on Windows
utils: support building android SDKs on Windows
This adds the ability to build the Android SDKs as part of the Windows build.