-
Notifications
You must be signed in to change notification settings - Fork 246
Fix building in-tree with cmake -DLLVM_LINK_LLVM_DYLIB=ON #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building in-tree with cmake -DLLVM_LINK_LLVM_DYLIB=ON #458
Conversation
Building in-tree with LLVM 11.0 master with the LLVM_LINK_LLVM_DYLIB cmake flag fails to link with the LLVMSPIRVLib library. Add an explicit dependency to force the correct build order and linking. Signed-off-by: Andrea Bocci <[email protected]>
|
Configuring and building in-tree with git clone https://github.com/llvm/llvm-project.git
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git llvm-project/llvm/projects/SPIRV-LLVM-Translator
mkdir llvm-project/build
cd llvm-project/build
cmake ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_LINK_LLVM_DYLIB=ON
make llvm-spirv -j`nproc`results in the link errors This commit fixes the link step by adding an explicit dependency on the LLVMSPIRVLib library. |
AlexeySachkov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me,
@AlexeySotkin, we probably need to add this configuration to Travis CI
svenvh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Building in-tree with LLVM 11.0 master with the LLVM_LINK_LLVM_DYLIB cmake flag fails to link with the LLVMSPIRVLib library.
Add an explicit dependency to force the correct build order and linking.
Signed-off-by: Andrea Bocci [email protected]