From b491d34d7899afb6a4f0eb4f591ffa26a7cab2c8 Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Mon, 23 Jun 2025 17:28:28 +0200 Subject: [PATCH] Fix build with shared libraries With `-DBUILD_SHARED_LIBS=ON`, the command line option gets defined twice because the source file is included twice, once as part of the library, once directly in the binary. Fix this by adding source files only to the library, not to the binary. --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db11490..3092ca0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,6 @@ if (llvm_dialects_is_in_llvm_build_tree) add_tablegen(llvm-dialects-tblgen LLVM_DIALECTS DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" EXPORT LLVM - ${LLVM_DIALECTS_TABLEGEN_SOURCES} ) if(CMAKE_CROSSCOMPILING) set(LLVM_DIALECTS_TABLEGEN_EXE_HOST "${LLVM_DIALECTS_TABLEGEN_EXE}" CACHE