Enable llvm-driver for:
llvm-dwp
llvm-libtool-darwin
sancov
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,030 ms | x64 debian > MLIR.Examples/standalone::test.toy |
Event Timeline
Ah, because we link against CoreFoundation. I wonder if on Apple platforms, we should just link the driver against it too.
Something like that is the plan. Most of the tools left to be added to the driver use target_link_libraries. Need to go through those and conditionally link the driver against those libs when LLVM_TOOL_LLVM_DRIVER_BUILD is enabled.
I think a better solution would be change the type of linkage from PRIVATE to PUBLIC. To give a concrete example, in https://github.com/llvm/llvm-project/blob/244fd4dfc56a0d59655c65adac6a7258114b8af2/llvm/tools/dsymutil/CMakeLists.txt#L42 you'd use:
target_link_libraries(dsymutil PUBLIC "-framework CoreFoundation")
When driver is not being used, add_llvm_tool bottoms out in add_executable and there's no difference to PRIVATE and PUBLIC, but when driver is enabled add_llvm_tool bottoms out in add_library(... OBJECT ...) and there PUBLIC is correct because it'll make sure that the link flags will be transitively propagated.