Closed
Description
Describe the bug
My Android CI builds each new snapshot tag of the stdlib with the Android NDK, but since #59846 it cannot cross-compile the stdlib:
swift/stdlib/public/Platform/Glibc.swift.gyb:13:19: error: no such module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
Steps To Reproduce
Steps to reproduce the behavior:
- Cross-compile the stdlib with an alternate libc sysroot.
Expected behavior
Previously, the Swift compiler would look in the -sdk
and -resource-dir
flags passed in for a Swift resource directory and use the glibc.modulemap
from there. Now, it only remaps any Include directories the clang Driver is aware of, which works fine if using the system libc sysroot, but not for alternate cross-compilation sysroots.
Environment
- OS: Ubuntu 20.04 x86_64 building for Android API 24 with LTS NDK 23c
Additional context
@3405691582 has also noted that a mistaken check from that pull broke building for non-Linux platforms like BSD.
@egorzhdan, let me know if you have a fix in mind.