Skip to content

Conversation

@finagolfin
Copy link
Member

@finagolfin finagolfin requested review from a team, artemcm, compnerd and tshortli as code owners May 19, 2025 09:55

set(custom_env "PYTHONIOENCODING=UTF8")
if(SWIFTFILE_IS_STDLIB OR
if(SWIFT_INCLUDE_TOOLS AND (SWIFTFILE_IS_STDLIB OR
Copy link
Member Author

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.

@finagolfin
Copy link
Member Author

@swift-ci please smoke test

// 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
Copy link
Member Author

@finagolfin finagolfin May 19, 2025

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.

@finagolfin
Copy link
Member Author

Merging to get Android CI green, still listening though if any feedback.

@finagolfin finagolfin merged commit 998a676 into swiftlang:main May 20, 2025
3 checks passed
@finagolfin finagolfin deleted the droid branch May 20, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants