Skip to content

Commit 5eed595

Browse files
committed
fix: enforce LLVM as required dependency to prevent small backend-less artifacts
1 parent d179fc4 commit 5eed595

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif()
1818
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
1919

2020
# --- LLVM Configuration ---
21-
find_package(LLVM CONFIG)
21+
find_package(LLVM CONFIG REQUIRED)
2222

2323
# --- LibFFI Configuration ---
2424
# specialized find_package might be needed if not in standard path, but let's try standard first
@@ -44,18 +44,13 @@ else()
4444
message(WARNING "LibFFI not found. FFI features will be disabled.")
4545
endif()
4646

47-
if (LLVM_FOUND)
48-
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
49-
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
50-
add_definitions(${LLVM_DEFINITIONS})
51-
link_directories(${LLVM_LIBRARY_DIRS})
47+
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
48+
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
49+
add_definitions(${LLVM_DEFINITIONS})
50+
link_directories(${LLVM_LIBRARY_DIRS})
5251

53-
# Map generic components to specific libs
54-
llvm_map_components_to_libnames(llvm_libs core support executionengine native ipo analysis transformutils bitwriter)
55-
else()
56-
message(WARNING "LLVM not found. Building without LLVM backend.")
57-
set(llvm_libs "")
58-
endif()
52+
# Map generic components to specific libs
53+
llvm_map_components_to_libnames(llvm_libs core support executionengine native ipo analysis transformutils bitwriter)
5954

6055
# Export symbols for Windows DLL
6156
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

0 commit comments

Comments
 (0)