mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If one is building Swift against an instrumented LLVM build, when the functions in AddPureSwift.cmake tries to link Swift code that also links LLVM instrumented code, the linking will fail because the linker will not use the profiling runtimes. The modifications replicate the existing code in LLVM HandleLLVMOptions.cmake, but adapted to Swift variables where possible. The necessary arguments are forwarded through `-Xclang-linker` because the spelling of the Swift driver does not give access to all the options that Clang provides. This has been tested with an unified build, but a standalone build could still pass the `LLVM_*` variables to the Swift build system to make use of this code.
15 KiB
15 KiB