-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from zourenDevote/develop
Develop
- Loading branch information
Showing
12 changed files
with
189 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "third_party/cibe"] | ||
path = third_party/cibe | ||
url = https://github.com/zourenDevote/CIBE.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,8 @@ class LLVMBuilderChain : public AsmBuilder { | |
std::string Rpath; | ||
}; | ||
|
||
|
||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,102 @@ | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
find_package(LLVM 15 REQUIRED CONFIG) | ||
if(BUILD_WITH_CMODEL) | ||
message(STATUS "Build with cmodel") | ||
set(SRC_FILE | ||
pre_analysis.cpp | ||
global_variable.cpp | ||
ast_visitor.cpp | ||
ast_dumper.cpp | ||
ast.cpp | ||
kale_util.cpp | ||
parser.cpp | ||
test/token_parser_test.cpp | ||
main.cpp | ||
asm_builder.cpp | ||
) | ||
|
||
#set(ARCHS | ||
# AArch64 | ||
# AMDGPU | ||
# ARM | ||
# AVR | ||
# BPF | ||
# Hexagon | ||
# Lanai | ||
# Mips | ||
# MSP430 | ||
# # NVPTX | ||
# PowerPC | ||
# RISCV | ||
# Sparc | ||
# SystemZ | ||
# WebAssembly | ||
# X86 | ||
# # XCore | ||
#) | ||
add_executable(${PROJECT_NAME} ${SRC_FILE}) | ||
|
||
set(LLVM_LIBS | ||
"LLVMAnalysis" | ||
"LLVMCore" | ||
"LLVMSupport" | ||
# "LLVMAsmPrinter" | ||
# "LLVMXCoreCodeGen" | ||
# "LLVMXCoreDesc" | ||
# "LLVMXCoreInfo" | ||
# "LLVMNVPTXCodeGen" | ||
# "LLVMNVPTXDesc" | ||
# "LLVMNVPTXInfo" | ||
) | ||
target_include_directories( | ||
${PROJECT_NAME} | ||
PUBLIC ${PROJECT_SOURCE_DIR}/third_party/cxxopts | ||
PUBLIC ${PROJECT_SOURCE_DIR}/include | ||
) | ||
else () | ||
message(STATUS "Build with llvm-15") | ||
find_package(LLVM 15 REQUIRED CONFIG) | ||
|
||
#foreach(arch ${ARCHS}) | ||
# message(STATUS "ARCH ${arch}") | ||
# list(APPEND LLVM_LIBS "LLVM${arch}CodeGen") | ||
# list(APPEND LLVM_LIBS "LLVM${arch}AsmParser") | ||
#endforeach () | ||
#set(ARCHS | ||
# AArch64 | ||
# AMDGPU | ||
# ARM | ||
# AVR | ||
# BPF | ||
# Hexagon | ||
# Lanai | ||
# Mips | ||
# MSP430 | ||
# # NVPTX | ||
# PowerPC | ||
# RISCV | ||
# Sparc | ||
# SystemZ | ||
# WebAssembly | ||
# X86 | ||
# # XCore | ||
#) | ||
|
||
link_directories(${LLVM_LIBRARY_DIRS}) | ||
set(LLVM_LIBS | ||
"LLVMAnalysis" | ||
"LLVMCore" | ||
"LLVMSupport" | ||
# "LLVMAsmPrinter" | ||
# "LLVMXCoreCodeGen" | ||
# "LLVMXCoreDesc" | ||
# "LLVMXCoreInfo" | ||
# "LLVMNVPTXCodeGen" | ||
# "LLVMNVPTXDesc" | ||
# "LLVMNVPTXInfo" | ||
) | ||
|
||
set(SRC_FILE | ||
pre_analysis.cpp | ||
global_variable.cpp | ||
ast_visitor.cpp | ||
ast_dumper.cpp | ||
ast.cpp | ||
ir_support.cpp | ||
kale_util.cpp | ||
parser.cpp | ||
ir_builder.cpp | ||
test/token_parser_test.cpp | ||
main.cpp | ||
asm_builder.cpp | ||
type_checker.cpp | ||
) | ||
#foreach(arch ${ARCHS}) | ||
# message(STATUS "ARCH ${arch}") | ||
# list(APPEND LLVM_LIBS "LLVM${arch}CodeGen") | ||
# list(APPEND LLVM_LIBS "LLVM${arch}AsmParser") | ||
#endforeach () | ||
|
||
add_executable(${PROJECT_NAME} ${SRC_FILE}) | ||
link_directories(${LLVM_LIBRARY_DIRS}) | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} | ||
PUBLIC ${PROJECT_SOURCE_DIR}/third_party/cxxopts | ||
PUBLIC ${PROJECT_SOURCE_DIR}/include | ||
PUBLIC ${LLVM_INCLUDE_DIRS} | ||
) | ||
set(SRC_FILE | ||
pre_analysis.cpp | ||
global_variable.cpp | ||
ast_visitor.cpp | ||
ast_dumper.cpp | ||
ast.cpp | ||
ir_support.cpp | ||
kale_util.cpp | ||
parser.cpp | ||
ir_builder.cpp | ||
test/token_parser_test.cpp | ||
main.cpp | ||
asm_builder.cpp | ||
type_checker.cpp | ||
) | ||
|
||
message(STATUS ${LLVM_LIBS}) | ||
target_link_libraries(${PROJECT_NAME} | ||
PUBLIC ${LLVM_LIBS} | ||
) | ||
add_executable(${PROJECT_NAME} ${SRC_FILE}) | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} | ||
PUBLIC ${PROJECT_SOURCE_DIR}/third_party/cxxopts | ||
PUBLIC ${PROJECT_SOURCE_DIR}/include | ||
PUBLIC ${LLVM_INCLUDE_DIRS} | ||
) | ||
|
||
message(STATUS ${LLVM_LIBS}) | ||
target_link_libraries(${PROJECT_NAME} | ||
PUBLIC ${LLVM_LIBS} | ||
) | ||
|
||
endif () | ||
|
Oops, something went wrong.