updates LLVM build
This commit is contained in:
@ -40,6 +40,9 @@ set(LIB_SOURCES
|
||||
if(WITH_TCC)
|
||||
list(APPEND LIB_SOURCES src/vm/tcc/vm_tgc_c.cpp)
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
list(APPEND LIB_SOURCES src/vm/llvm/vm_tgc_c.cpp src/vm/llvm/fp_impl.cpp)
|
||||
endif()
|
||||
|
||||
# library files
|
||||
FILE(GLOB GEN_ISS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src-gen/iss/arch/*.cpp)
|
||||
@ -70,7 +73,7 @@ endif()
|
||||
add_library(${PROJECT_NAME} ${LIB_SOURCES})
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-shift-count-overflow)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-shift-count-overflow)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /wd4293)
|
||||
endif()
|
||||
@ -101,6 +104,13 @@ if(TARGET RapidJSON::RapidJSON)
|
||||
elseif(TARGET RapidJSON)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC RapidJSON)
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC ${LLVM_DEFINITIONS})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${LLVM_INCLUDE_DIRS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries( ${PROJECT_NAME} PUBLIC ${LLVM_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
|
Reference in New Issue
Block a user