[SR-4974] Cannot build Android static lib on macOS #47551
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Attachment: Download
Environment
Swift master branch (LLVM 0af67ee12ff4f3fd8f9bdf4b879eebcce4825ec7, Clang 8ec8fa633cf4ada2e67fae7f888fe410bf7e0763, Swift 069ed3e)
Additional Detail from JIRA
md5: 0f65b3b0a7dfad4ccbb396e729badabd
relates to:
Issue Description:
Trying to build stdlib of Swift for Android on macOS is failing. If I understand the whole thing correctly, when I configure the build script to build for Android, it will do the following:
Building cmark-macosx-x86_64
Building llvm-macosx-x86_64
Building swift-macosx-x86_64 (with targets swift-test-stdlib-macosx-x86_64 swift-test-stdlib-android-armv7 swift-benchmark-macosx-x86_64) <– Failing here
Firstly, I don't understand why I have to build the macOS variant of the stdlib even if I ask specifically for the android one using the parameter `--stdlib-deployment-targets "android-armv7"`. Indeed, if I add this parameter, an error will be raised because CMake won't find swiftRuntime-macos target. Maybe this specific problem would need another ticket.
Secondly, the error that prevents me from building swift raises when the macOS variant is currently building. If I check the build commands, I think there is a problem because the Android sysroot and includes are appended to the macOS specifics commands, and not only on the Android ones.
If I refer to this PR (#4972), building static stdlib should be working. I've checked out the commit related to this PR and, even if I didn't succeed to build because of too recent dependencies, the build commands does not have this anomaly.
Here is the error raised when building with an up-to-date source:
The command that raises this error:
Finally, for comparison, here is the command that we could find at the time of the PR (not on the same file, but at the same build step):
The text was updated successfully, but these errors were encountered: