File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ if (LLVM_FOUND)
2424 link_directories (${LLVM_LIBRARY_DIRS} )
2525
2626 # Map generic components to specific libs
27- llvm_map_components_to_libnames (llvm_libs core support executionengine native ipo )
27+ llvm_map_components_to_libnames (llvm_libs core support executionengine native ipo analysis transformutils bitwriter )
2828else ()
2929 message (WARNING "LLVM not found. Building without LLVM backend." )
3030 set (llvm_libs "" )
@@ -37,7 +37,6 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
3737include_directories (include )
3838include_directories (src )
3939
40-
4140# --- Library Sources ---
4241file (GLOB_RECURSE LIB_SOURCES
4342 "src/*.c"
@@ -74,6 +73,9 @@ if (PROX_STATIC_BUILD)
7473else ()
7574 # Traditional split build
7675 add_library (proxpl_lib SHARED ${LIB_SOURCES} )
76+ if (LLVM_FOUND)
77+ target_link_libraries (proxpl_lib PRIVATE ${llvm_libs} )
78+ endif ()
7779 add_executable (proxpl src/main.c )
7880 target_link_libraries (proxpl PRIVATE proxpl_lib )
7981endif ()
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ void test_ir(const char* source) {
5959}
6060
6161int main () {
62+ initVM (& vm ); // Initialize VM for string interning and GC
63+
6264 const char * code =
6365 "let x = 10;\n"
6466 "if (x > 5) {\n"
@@ -73,5 +75,7 @@ int main() {
7375 "return x + z;" ;
7476
7577 test_ir (code );
78+
79+ freeVM (& vm ); // Cleanup
7680 return 0 ;
7781}
You can’t perform that action at this time.
0 commit comments