Skip to content

Conversation

@edymtt
Copy link
Contributor

@edymtt edymtt commented Dec 9, 2025

  • Explanation:
    Add an explicit dependency on the _Builtin_float overlay to the Android _math overlay -- this will ensure we are always able to build, since this way we will never get in a situation in which the _Builtin_float swiftmodule is present in the build folder but missing the architecture we are targeting (thus preventing to fall back to the _Builtin_float module exposed by Clang)

  • Scope:
    CMake target that generates the _math overlay for Android SDKs -- that is currently used by the Windows toolchain and Android package jobs in CI

  • Issues:
    rdar://165768601
    oss-swift-package-swift-sdk-for-android failed: error: could not find module '_Builtin_float' for target 'x86_64-unknown-linux-android' swift-docker#510

  • Original PRs:
    CMake Android: ensure _Builtin_float is built before _math #85872

  • Risk:
    Low

    • this only affects configurations that generates the Android SDK
    • in the worst case, the change has not effect and we will keep hitting failures when building _math
  • Testing:

    • built the affected package preset at desk, then manually removed a slice for _Builtin_float swiftmodule and rebuilt _math -- verified that _Builtin_float is rebuilt
    • CI testing of the Windows toolchain to ensure the changes in the Runtimes build system work
  • Reviewers:
    @finagolfin @compnerd

_math would be able to build against either the Swift or the clang
module for _Builtin_float; however the build will fail if the Swift
module is present but does not contain the architectures we need, with errors
like

```
<unknown>:0: error: could not find module
'_Builtin_float' for target 'armv7-unknown-linux-android'; found:
aarch64-unknown-linux-android, x86_64-unknown-linux-android, at:
/home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/lib/swift/android/_Builtin_float.swiftmodule/armv7-unknown-linux-android
```

In other words, in this situation we are not falling back to the clang
module.

Addresses rdar://165768601

(cherry picked from commit 817a890)
@edymtt edymtt requested a review from a team as a code owner December 9, 2025 17:34
@edymtt
Copy link
Contributor Author

edymtt commented Dec 9, 2025

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Dec 9, 2025

@swift-ci please build toolchain Windows

Copy link
Member

@finagolfin finagolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@edymtt edymtt merged commit 7a7ad4c into swiftlang:release/6.3 Dec 10, 2025
6 checks passed
@edymtt edymtt deleted the edymtt/android-build-builtin-float-before-math-6.3 branch December 10, 2025 14:16
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.

3 participants