You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SwiftPM it use is the one from:
Swift version 5.1.3 (swift-5.1.3-RELEASE)
Target: x86_64-unknown-linux-gnu
(Though SwiftPM is obviously being directed to use a separate Android toolchain.)
Additional Detail from JIRA
Votes
0
Component/s
Package Manager
Labels
Bug
Assignee
None
Priority
Medium
md5: 85feafe268e39c401b50acd96e89951d
Issue Description:
The module wrapping strategy used by SwiftPM since September 2019 does not pass any -X flags to swiftc, nor does it pass on any toolchain information from --destination.
This breaks cross‐compilation.
Each file is initially compiled correctly, with the necessary flags being passed on:
$ file .build/aarch64-unknown-linux-android/debug/Module.build/File.swift.o
.build/aarch64-unknown-linux-android/debug/Module.build/File.swift.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), with debug_info, not stripped
But then module wrapping ends up being done for the wrong architecture due to the absence of the flags:
$ file .build/aarch64-unknown-linux-android/debug/Module.build/Module.swiftmodule.o
.build/aarch64-unknown-linux-android/debug/Module.build/Module.swiftmodule.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
The mismatched architectures cause the whole thing to fail later when SwiftPM attempts to link it:
ld.lld: error: /[...]/.build/aarch64-unknown-linux-android/debug/Module.build/Module.swiftmodule.o is incompatible with aarch64linux
The text was updated successfully, but these errors were encountered:
Environment
The SwiftPM it use is the one from:
Swift version 5.1.3 (swift-5.1.3-RELEASE)
Target: x86_64-unknown-linux-gnu
(Though SwiftPM is obviously being directed to use a separate Android toolchain.)
Additional Detail from JIRA
md5: 85feafe268e39c401b50acd96e89951d
Issue Description:
The module wrapping strategy used by SwiftPM since September 2019 does not pass any
-X
flags to swiftc, nor does it pass on any toolchain information from--destination
.This breaks cross‐compilation.
Each file is initially compiled correctly, with the necessary flags being passed on:
But then module wrapping ends up being done for the wrong architecture due to the absence of the flags:
The mismatched architectures cause the whole thing to fail later when SwiftPM attempts to link it:
The text was updated successfully, but these errors were encountered: