The initial implementation didn't properly support cross-compilation
via the runtime build, the updated implementation should address that
by expanding the CMAKE_C_COMPILE_OBJECT variable with correct values.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This is really nasty, but I'm not sure if there's a better way to do this.
compiler-rt/cmake/Modules/AddCompilerRT.cmake | ||
---|---|---|
278 ↗ | (On Diff #197489) | I think you mean "CMake 3.9" and not "LLVM 3.9" :) |
278 ↗ | (On Diff #197489) | Is it okay to drop this part? I don't know how common it is to set COMPILE_FLAGS on sources. |
304 ↗ | (On Diff #197489) | Would separate_arguments be better here, to handle quoted arguments etc. correctly? (Though I guess the string(REPLACE) on line 282 is potentially screwing up quoted arguments anyway.) |
compiler-rt/cmake/Modules/AddCompilerRT.cmake | ||
---|---|---|
278 ↗ | (On Diff #197489) | I don't think it's very often, but I'm fine including it. |
278 ↗ | (On Diff #197489) | Yes, but after looking into it a bit I realized that this may not be enough since CMake doesn't allow specifying output names for object libraries so I deleted the comment. |
304 ↗ | (On Diff #197489) | It seems to be working. |
This all looks reasonable to me. It is kinda frustrating that CMake doesn't support any way to control the output name of an object file, or even the install name of one. I suspect that is probably because some of CMake's generation targets (like Xcode) don't give CMake explicit control over output object file names.