Closed illwieckz closed 1 year ago
Which cmake command are you using?
Hi @nikic here is the options I use to build llvm
:
-D'LLVM_BUILD_TOOLS'='ON' \
-D'LLVM_ENABLE_ASSERTIONS'="${llvm_enable_assertions}" \
-D'LLVM_ENABLE_PROJECTS'='clang' \
-D'LLVM_ENABLE_RTTI'='ON' \
-D'LLVM_BUILD_RUNTIME'='OFF' \
-D'LLVM_BUILD_RUNTIMES'='OFF' \
-D'LLVM_BUILD_TESTS'='OFF' \
-D'LLVM_BUILD_UTILS'='OFF' \
-D'LLVM_ENABLE_PLUGINS'='OFF' \
-D'LLVM_INCLUDE_BENCHMARKS'='OFF' \
-D'LLVM_INCLUDE_DOCS'='OFF' \
-D'LLVM_INCLUDE_EXAMPLES'='OFF' \
-D'LLVM_INCLUDE_TESTS'='OFF' \
-D'LLVM_INCLUDE_UTILS'='OFF' \
-D'LLVM_SPIRV_INCLUDE_TESTS'='OFF' \
-D'LLVM_TARGETS_TO_BUILD'="AMDGPU;Native" \
-D'LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR'="${workspace_dir}/SPIRV-Headers" \
-D'CLANG_ENABLE_ARCMT'='OFF' \
-D'CLANG_ENABLE_STATIC_ANALYZER'='OFF' \
-D'CLANG_TOOL_DICTIONARY_BUILD'='OFF' \
-D'CLANG_TOOL_HANDLE_CXX_BUILD'='OFF' \
-D'CLANG_TOOL_HANDLE_LLVM_BUILD'='OFF'
I also set a symlink to SPIRV-LLVM-Translator
to llvm-project/llvm/projects/SPIRV-LLVM-Translator
before building llvm
.
And here are the options I use to build libclc
:
-D'LIBCLC_TARGETS_TO_BUILD'='amdgcn-mesa-mesa3d;r600--;spirv-mesa3d-;spirv64-mesa3d-'
Details can be found there.
I forgot to mention this are the defaults I use for all cmake projects in my scripts (they are added to the previously mentioned ones):
-S'.' \
-B'build' \
-G'Ninja' \
-D'CMAKE_INSTALL_PREFIX'="${install_dir}" \
-D'CMAKE_BUILD_TYPE'="${cmake_build_type}" \
-D'BUILD_SHARED_LIBS'='ON' \
This is a Release
build.
@nikic here is a fix:
I get this while building libclc AMD GCN targets with LLVM
17-git
(e58a49300e757ff61142f6abd227bd1437c1cf87),16.0.1
and16.0.0
(I haven't tried to build older Git references):I completely deleted the build and install directories on each attempt.