Commit cc25000
authored
[CMake] Respect LLVM instrumentation variables in AddPureSwift.cmake (#71135)
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.1 parent 499b218 commit cc25000
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
267 | 284 | | |
268 | 285 | | |
269 | 286 | | |
| |||
0 commit comments