[cmake] Fix host tool path with driver build on Windows#199152
Conversation
On Windows, the llvm-shlib dylib build uses the llvm-nm host tool to make all symbols visible by default. The LLVM_TOOL_LLVM_DRIVER_BUILD=ON build would fail because $<TARGET_FILE:llvm-nm> was invalid. This change passes the name of the symlink / executable copy as a custom property so things work out and the llvm-nm.exe host tool can be found.
🐧 Linux x64 Test ResultsThe build failed before running any tests. Detailed information about the build failure could not be automatically obtained. Download the build's log file to see the details. If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the |
🪟 Windows x64 Test ResultsThe build failed before running any tests. Detailed information about the build failure could not be automatically obtained. Download the build's log file to see the details. If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the |
|
Sorry, I'm not the right person to review this |
|
Hmm, looks like theres an issue in some other spots. This seems fine to me, so not too sure what the problem would be. cc: @petrhosek do you grok why this went off the rails? |
Sorry, I didn't expect to get premerge errors from Linux, I guess I'll dig into that. The change was tested and drafted on Windows. I was trying to build the biggest possible llvm.exe so I could optimize LLD, and I ran into this. Also, I think I owe Petr reviews on the governance docs, so I didn't want to bother him with trivial cmake stuff. :) |
I see two issues:
|
On Windows, the llvm-shlib dylib build uses the llvm-nm host tool to
make all symbols visible by default. The LLVM_TOOL_LLVM_DRIVER_BUILD=ON
build would fail because $<TARGET_FILE:llvm-nm> was invalid. This change
passes the name of the symlink / executable copy as a custom property so
things work out and the llvm-nm.exe host tool can be found.