Open
Description
Description
On linux, I use -print-target-info
to get paths for inclusion in -L and -I of my swift compile commands.
When using -enable-experiemental-feature Embedded
, paths under $PREFIX/usr/lib/swift/embedded
are not used, and the resulting paths are nonsensical.
Reproduction
swiftc -enable-experimental-feature Embedded -target x86_64-unknown-none-elf -print-target-info
{
"compilerVersion": "Swift version 6.2-dev (LLVM 86709865028dc89, Swift 2e6d7f71608bbad)",
"target": {
"triple": "x86_64-unknown-none-elf-unknown",
"unversionedTriple": "x86_64-unknown-none",
"moduleTriple": "x86_64-unknown-none-elf-unknown",
"platform": "none",
"arch": "x86_64",
"pointerWidthInBits": 64,
"pointerWidthInBytes": 8,
"compatibilityLibraries": [ ],
"librariesRequireRPath": false
},
"paths": {
"runtimeLibraryPaths": [
"/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift/none"
],
"runtimeLibraryImportPaths": [
"/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift/none",
"/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift/none/x86_64"
],
"runtimeResourcePath": "/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift"
}
}
Expected behavior
The output should look more like this:
{
"compilerVersion": "Swift version 6.2-dev (LLVM 86709865028dc89, Swift 2e6d7f71608bbad)",
"target": {
"triple": "x86_64-unknown-none-elf-unknown",
"unversionedTriple": "x86_64-unknown-none",
"moduleTriple": "x86_64-unknown-none-elf-unknown",
"platform": "none",
"arch": "x86_64",
"pointerWidthInBits": 64,
"pointerWidthInBytes": 8,
"compatibilityLibraries": [ ],
"librariesRequireRPath": false
},
"paths": {
"runtimeLibraryPaths": [
"/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift/embedded/x86_64-unknown-none-elf"
],
"runtimeLibraryImportPaths": [
"/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift/embedded",
"/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift/embedded/x86_64-unknown-none-elf"
],
"runtimeResourcePath": "/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-04-02/usr/lib/swift"
}
}
Environment
$ swiftc -version
Swift version 6.2-dev (LLVM 86709865028dc89, Swift 2e6d7f71608bbad)
Target: x86_64-unknown-linux-gnu
Build config: +assertions
Additional information
No response