Skip to content

Commit 40acb71

Browse files
committed
Merge branch 'feature/opcode-tests'
2 parents a6d1cd7 + a1afcc7 commit 40acb71

82 files changed

Lines changed: 4382 additions & 2477 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ARCHITECTURE_REVIEW.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

BASELINE_REPORT.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
<<<<<<< HEAD
12
cmake_minimum_required(VERSION 3.15)
23
project(ProXPL C)
4+
=======
5+
cmake_minimum_required(VERSION 3.13)
6+
project(ProXPL)
7+
>>>>>>> feature/opcode-tests
38

9+
# Enable C and C++
10+
enable_language(C CXX)
411
set(CMAKE_C_STANDARD 99)
12+
<<<<<<< HEAD
513
set(CMAKE_C_STANDARD_REQUIRED ON)
614

715
if (MSVC)
@@ -49,4 +57,52 @@ endif()
4957

5058
if (BUILD_BENCH)
5159
add_subdirectory(tools/bench)
60+
=======
61+
set(CMAKE_CXX_STANDARD 17)
62+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
63+
64+
# --- LLVM Configuration ---
65+
find_package(LLVM REQUIRED CONFIG)
66+
67+
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
68+
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
69+
70+
# Include LLVM directories
71+
include_directories(${LLVM_INCLUDE_DIRS})
72+
add_definitions(${LLVM_DEFINITIONS})
73+
74+
# Link directories
75+
link_directories(${LLVM_LIBRARY_DIRS})
76+
77+
# Map generic components to specific libs
78+
llvm_map_components_to_libnames(llvm_libs core support executionengine native ipo)
79+
80+
# --- Project Source ---
81+
# Export symbols for Windows DLL
82+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
83+
84+
# --- Project Source ---
85+
include_directories(include)
86+
87+
# Gather sources (excluding main.c for library)
88+
file(GLOB_RECURSE LIB_SOURCES
89+
"src/*.c"
90+
"src/compiler/*.cpp"
91+
)
92+
list(FILTER LIB_SOURCES EXCLUDE REGEX ".*main\\.c$")
93+
94+
# --- Shared Library ---
95+
add_library(proxpl_lib SHARED ${LIB_SOURCES})
96+
target_link_libraries(proxpl_lib PRIVATE ${llvm_libs})
97+
98+
# --- Executable ---
99+
add_executable(proxpl src/main.c ${LIB_SOURCES})
100+
101+
# Link LLVM and standard libraries
102+
target_link_libraries(proxpl PRIVATE ${llvm_libs})
103+
104+
if(UNIX)
105+
target_link_libraries(proxpl PRIVATE pthread dl z tinfo)
106+
target_link_libraries(proxpl_lib PRIVATE pthread dl z tinfo)
107+
>>>>>>> feature/opcode-tests
52108
endif()

0 commit comments

Comments
 (0)