-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix standalone stdlib build on Unix and make some Android CI tweaks #81601
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
Conversation
@@ -928,9 +928,9 @@ function(_compile_swift_files | |||
endif() | |||
|
|||
set(custom_env "PYTHONIOENCODING=UTF8") | |||
if(SWIFTFILE_IS_STDLIB OR | |||
if(SWIFT_INCLUDE_TOOLS AND (SWIFTFILE_IS_STDLIB OR |
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.
@rintaro, building a standalone stdlib on linux is currently broken without this change, please review.
@swift-ci please smoke test |
@@ -35,7 +35,7 @@ | |||
// APPLE-NOSTDLIBIMPORT-NEXT: [0] BUILD_DIR/lib/swift/macosx | |||
// APPLE-NOSTDLIBIMPORT-NEXT: (End of search path lists.) | |||
|
|||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -target x86_64-unknown-linux-android -nostdlibimport -parse %s -Rmodule-loading 2>&1 | %FileCheck -check-prefix=ANDROID-NOSTDLIBIMPORT %s | |||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -target x86_64-unknown-linux-android -nostdlibimport -parse -parse-stdlib %s -Rmodule-loading 2>&1 | %FileCheck -check-prefix=ANDROID-NOSTDLIBIMPORT %s |
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.
This test breaks on precisely one CI without this change, the community Android AArch64 CI. That test output swallows up the same error as the earlier line in this test that I fixed a couple days ago, which I again found by running the swift-frontend
command alone locally:
> /home/finagolfin/swift-DEVELOPMENT-SNAPSHOT-2025-05-14-a-ubi9/usr/bin/swift-frontend -target aarch64-unknown-linux-android -sdk /home/finagolfin/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -resource-dir /home/finagolfin/build/Ninja-Release/swift-linux-x86_64/./lib/swift -module-cache-path /home/finagolfin/build/Ninja-Release/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache -swift-version 4 -typo-correction-limit 10 -sdk /home/finagolfin/swift/test/Inputs/clang-importer-sdk -target x86_64-unknown-linux-android -nostdlibimport -parse /home/finagolfin/swift/test/Frontend/default-search-paths.swift -Rmodule-loading
<unknown>:0: warning: libc not found for 'x86_64-unknown-linux-android'; C stdlib may be unavailable
Module import search paths:
Framework search paths:
Implicit framework search paths:
Runtime library import search paths:
[0] /home/finagolfin/build/Ninja-Release/swift-linux-x86_64/./lib/swift/android
[1] /home/finagolfin/build/Ninja-Release/swift-linux-x86_64/./lib/swift/android/x86_64
(End of search path lists.)
<unknown>:0: error: could not find module '_Concurrency' for target 'x86_64-unknown-linux-android'; found: aarch64-unknown-linux-android, at: /home/finagolfin/build/Ninja-Release/swift-linux-x86_64/./lib/swift/android/_Concurrency.swiftmodule
Since this import search lookup is done independently of the -parse-stdlib
flag for non-stdlib modules and the stdlib is not needed here, just adding -parse-stdlib
avoids that unrelated error and gets this test to pass on the Android AArch64 CI too.
Merging to get Android CI green, still listening though if any feedback. |
This reverts commit 998a676.
@weliveindetail, got the list of now passing tests from the Windows toolchain CI, please review that change.