Begin adding support for using swiftc as a linker driver#236
Conversation
|
@swift-ci test |
There was a problem hiding this comment.
Any reason to prefer the driver option at all vs just using Xlinker? Does -compatibility_version at the clang level actually do anything?
There was a problem hiding this comment.
It doesn't have any behavior I know of but I'd prefer to use driver options whenever possible for maximum compatibility
3729cde to
4506efc
Compare
|
@swift-ci test Linux |
4506efc to
9022e09
Compare
|
@swift-ci test |
9022e09 to
8aa2101
Compare
|
@swift-ci test |
8aa2101 to
7354e45
Compare
|
@swift-ci test |
7354e45 to
f48504d
Compare
|
@swift-ci test |
f48504d to
647b134
Compare
|
@swift-ci test linux |
647b134 to
14f6908
Compare
|
@swift-ci test linux |
14f6908 to
64337e3
Compare
|
@swift-ci test linux |
64337e3 to
eed2eb1
Compare
|
@swift-ci test linux |
|
@swift-ci test macOS |
|
@swift-ci test windows |
eed2eb1 to
3a36033
Compare
|
@swift-ci test |
|
@swift-ci test Windows |
3a36033 to
c1ed45a
Compare
|
@swift-ci test |
c1ed45a to
54ef5be
Compare
|
@swift-ci test Windows |
1 similar comment
|
@swift-ci test Windows |
|
@swift-ci test Windows |
|
@swift-ci test |
54ef5be to
6473758
Compare
|
@swift-ci test Windows |
6473758 to
71c9bc5
Compare
|
@swift-ci test Windows |
71c9bc5 to
8c23c59
Compare
|
@swift-ci test Windows |
8c23c59 to
52923db
Compare
|
@swift-ci test |
This is controlled via the LINKER_DRIVER setting
52923db to
47e61e8
Compare
|
@swift-ci test |
|
|
||
| public override func computeExecutablePath(_ cbc: CommandBuildContext) -> String { | ||
| return cbc.producer.hostOperatingSystem.imageFormat.executableName(basename: "clang") | ||
| // TODO: We should also provide an "auto" option which chooses based on the source files in the target |
There was a problem hiding this comment.
I do remember there being some subtle differences between linker drivers for C sources as well, so "auto" could result in surprises.
…r is supported After swiftlang#236, we no longer need to manually add Swift specific linker flags in the WebAssembly SDK.
This is controlled via the LINKER_DRIVER setting
This is enough to at least link a basic CLI tool on macOS. It needs some more work and tests still