-
Notifications
You must be signed in to change notification settings - Fork 17
/
CMakeLists.txt
216 lines (197 loc) · 4.48 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
cmake_minimum_required(VERSION 2.8)
project(conec)
find_package(LLVM 13 REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
include_directories(
"${CMAKE_SOURCE_DIR}/src/c-compiler/"
)
set(LLVM_LINK_COMPONENTS
Analysis
BitReader
Core
ExecutionEngine
InstCombine
Interpreter
MC
MCDisassembler
MCJIT
Object
OrcJIT
RuntimeDyld
ScalarOpts
Support
Target
TransformUtils
native
nativecodegen
AsmPrinter
AArch64Info
AArch64Desc
AArch64AsmParser
AArch64Disassembler
AArch64CodeGen
ARMInfo
ARMDesc
ARMAsmParser
ARMDisassembler
ARMCodeGen
AMDGPUInfo
AMDGPUAsmParser
AMDGPUCodeGen
AVRAsmParser
AVRInfo
AVRDesc
AVRCodeGen
BPFInfo
BPFAsmParser
BPFDisassembler
BPFCodeGen
HexagonInfo
HexagonDesc
HexagonAsmParser
HexagonDisassembler
HexagonCodeGen
LanaiInfo
LanaiDesc
LanaiAsmParser
LanaiDisassembler
LanaiCodeGen
M68kInfo
M68kDesc
M68kAsmParser
M68kDisassembler
M68kCodeGen
MSP430Info
MSP430Desc
MSP430CodeGen
MSP430AsmParser
MipsInfo
MipsDesc
MipsAsmParser
MipsDisassembler
MipsCodeGen
NVPTXInfo
NVPTXCodeGen
PowerPCInfo
PowerPCDesc
PowerPCAsmParser
PowerPCDisassembler
PowerPCCodeGen
RISCVAsmParser
RISCVInfo
RISCVDesc
RISCVDisassembler
RiSCVCodeGen
SparcInfo
SparcDesc
SparcAsmParser
SparcDisassembler
SparcCodeGen
SystemZInfo
SystemZDesc
SystemZAsmParser
SystemZDisassembler
SystemZCodeGen
WebAssemblyInfo
WebAssemblyDesc
WebAssemblyAsmParser
WebAssemblyDisassembler
WebAssemblyCodeGen
X86Info
X86Desc
X86AsmParser
X86Disassembler
X86CodeGen
XCoreInfo
XCoreDesc
XCoreDisassembler
XCoreCodeGen
)
llvm_map_components_to_libnames(llvm_libs support core irreader ${LLVM_LINK_COMPONENTS})
add_executable(conec
src/c-compiler/conec.c
src/c-compiler/coneopts.c
src/c-compiler/shared/error.c
src/c-compiler/shared/fileio.c
src/c-compiler/shared/memory.c
src/c-compiler/shared/options.c
src/c-compiler/shared/timer.c
src/c-compiler/shared/utf8.c
src/c-compiler/ir/clone.c
src/c-compiler/ir/flow.c
src/c-compiler/ir/iexp.c
src/c-compiler/ir/inode.c
src/c-compiler/ir/instype.c
src/c-compiler/ir/itype.c
src/c-compiler/ir/name.c
src/c-compiler/ir/namespace.c
src/c-compiler/ir/nametbl.c
src/c-compiler/ir/nodelist.c
src/c-compiler/ir/nodes.c
src/c-compiler/ir/typetbl.c
src/c-compiler/ir/stmt/break.c
src/c-compiler/ir/stmt/const.c
src/c-compiler/ir/stmt/continue.c
src/c-compiler/ir/stmt/fielddcl.c
src/c-compiler/ir/stmt/fndcl.c
src/c-compiler/ir/stmt/import.c
src/c-compiler/ir/stmt/intrinsic.c
src/c-compiler/ir/stmt/module.c
src/c-compiler/ir/stmt/program.c
src/c-compiler/ir/stmt/return.c
src/c-compiler/ir/stmt/swap.c
src/c-compiler/ir/stmt/vardcl.c
src/c-compiler/ir/exp/allocate.c
src/c-compiler/ir/exp/arraylit.c
src/c-compiler/ir/exp/assign.c
src/c-compiler/ir/exp/block.c
src/c-compiler/ir/exp/borrow.c
src/c-compiler/ir/exp/cast.c
src/c-compiler/ir/exp/deref.c
src/c-compiler/ir/exp/fncall.c
src/c-compiler/ir/exp/if.c
src/c-compiler/ir/exp/literal.c
src/c-compiler/ir/exp/logic.c
src/c-compiler/ir/exp/namedval.c
src/c-compiler/ir/exp/nameuse.c
src/c-compiler/ir/exp/sizeof.c
src/c-compiler/ir/exp/typelit.c
src/c-compiler/ir/exp/vtuple.c
src/c-compiler/ir/types/array.c
src/c-compiler/ir/types/arrayref.c
src/c-compiler/ir/types/enum.c
src/c-compiler/ir/types/fnsig.c
src/c-compiler/ir/types/lifetime.c
src/c-compiler/ir/types/number.c
src/c-compiler/ir/types/permission.c
src/c-compiler/ir/types/pointer.c
src/c-compiler/ir/types/reference.c
src/c-compiler/ir/types/region.c
src/c-compiler/ir/types/struct.c
src/c-compiler/ir/types/ttuple.c
src/c-compiler/ir/types/typedef.c
src/c-compiler/ir/types/void.c
src/c-compiler/ir/meta/macro.c
src/c-compiler/ir/meta/genvardcl.c
src/c-compiler/ir/meta/generic.c
src/c-compiler/corelib/corelib.c
src/c-compiler/corelib/corenumber.c
src/c-compiler/parser/lexer.c
src/c-compiler/parser/parsemod.c
src/c-compiler/parser/parsefnflow.c
src/c-compiler/parser/parseexpr.c
src/c-compiler/parser/parsetype.c
src/c-compiler/parser/parsehelper.c
src/c-compiler/genllvm/genllvm.c
src/c-compiler/genllvm/genlstmt.c
src/c-compiler/genllvm/genlexpr.c
src/c-compiler/genllvm/genlalloc.c
src/c-compiler/genllvm/genltype.c
)
target_link_libraries(conec ${llvm_libs})
add_library(conestd
src/conestd/stdio.c
)