mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Builds llvmc and its examples with CMake.
Patch by arrowdodger! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
796f925175
commit
5fe5203c23
@ -1,4 +1,8 @@
|
||||
# add_subdirectory(src)
|
||||
add_subdirectory(src)
|
||||
|
||||
# TODO: support plugins and user-configured builds.
|
||||
# See ./doc/LLVMC-Reference.rst "Customizing LLVMC: the compilation graph"
|
||||
|
||||
if( LLVM_INCLUDE_EXAMPLES )
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
4
tools/llvmc/examples/CMakeLists.txt
Normal file
4
tools/llvmc/examples/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
add_subdirectory(Hello)
|
||||
add_subdirectory(Simple)
|
||||
add_subdirectory(mcc16)
|
||||
add_subdirectory(Skeleton)
|
4
tools/llvmc/examples/Hello/CMakeLists.txt
Normal file
4
tools/llvmc/examples/Hello/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
set(LLVM_USED_LIBS CompilerDriver)
|
||||
set(LLVM_LINK_COMPONENTS support)
|
||||
|
||||
add_llvm_example(Hello Hello.cpp)
|
10
tools/llvmc/examples/Simple/CMakeLists.txt
Normal file
10
tools/llvmc/examples/Simple/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
set(LLVM_TARGET_DEFINITIONS Simple.td)
|
||||
|
||||
tablegen(Simple.inc -gen-llvmc)
|
||||
|
||||
set(LLVM_USED_LIBS CompilerDriver)
|
||||
set(LLVM_LINK_COMPONENTS support)
|
||||
|
||||
add_llvm_example(Simple
|
||||
Simple.cpp
|
||||
)
|
11
tools/llvmc/examples/Skeleton/CMakeLists.txt
Normal file
11
tools/llvmc/examples/Skeleton/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
set(LLVM_TARGET_DEFINITIONS AutoGenerated.td)
|
||||
|
||||
tablegen(AutoGenerated.inc -gen-llvmc)
|
||||
|
||||
set(LLVM_USED_LIBS CompilerDriver)
|
||||
set(LLVM_LINK_COMPONENTS support)
|
||||
|
||||
add_llvm_example(llvmc-skeleton
|
||||
Hooks.cpp
|
||||
Main.cpp
|
||||
)
|
11
tools/llvmc/examples/mcc16/CMakeLists.txt
Normal file
11
tools/llvmc/examples/mcc16/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
set(LLVM_TARGET_DEFINITIONS PIC16.td)
|
||||
|
||||
tablegen(PIC16.inc -gen-llvmc)
|
||||
|
||||
set(LLVM_USED_LIBS CompilerDriver)
|
||||
set(LLVM_LINK_COMPONENTS support)
|
||||
|
||||
add_llvm_example(mcc16
|
||||
Hooks.cpp
|
||||
Main.cpp
|
||||
)
|
19
tools/llvmc/src/CMakeLists.txt
Normal file
19
tools/llvmc/src/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
set(LLVMGCCCOMMAND llvm-gcc)
|
||||
set(LLVMGXXCOMMAND llvm-g++)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Base.td.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Base.td
|
||||
@ONLY)
|
||||
|
||||
set(LLVM_TARGET_DEFINITIONS AutoGenerated.td)
|
||||
|
||||
tablegen(AutoGenerated.inc -gen-llvmc)
|
||||
|
||||
set(LLVM_USED_LIBS CompilerDriver)
|
||||
set(LLVM_LINK_COMPONENTS support)
|
||||
|
||||
add_llvm_tool(llvmc
|
||||
Hooks.cpp
|
||||
Main.cpp
|
||||
)
|
Loading…
Reference in New Issue
Block a user