Skip to content

Commit 9fec186

Browse files
committed
This sets up the conversion from AST to GCC
It will crash when compiling but its the code setup i want to get in sooner than later. Addresses gcc-mirror#15
1 parent 8e2f81b commit 9fec186

File tree

8 files changed

+1129
-475
lines changed

8 files changed

+1129
-475
lines changed

gcc/rust/Make-lang.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ GRS_OBJS = \
7070
rust/rust-ast-full-test.o \
7171
rust/rust-session-manager.o \
7272
rust/rust-resolution.o \
73+
rust/rust-compile.o \
7374
$(END)
7475
# removed object files from here
7576

@@ -209,7 +210,7 @@ CFLAGS-rust/rust-lang.o += -DDEFAULT_TARGET_VERSION=\"$(version)\" \
209210
-DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\"
210211

211212
# cross-folder includes - add new folders later
212-
RUST_INCLUDES = -I $(srcdir)/rust -I $(srcdir)/rust/lex -I $(srcdir)/rust/parse -I $(srcdir)/rust/ast -I $(srcdir)/rust/analysis
213+
RUST_INCLUDES = -I $(srcdir)/rust -I $(srcdir)/rust/lex -I $(srcdir)/rust/parse -I $(srcdir)/rust/ast -I $(srcdir)/rust/analysis -I $(srcdir)/rust/backend
213214

214215
# add files that require cross-folder includes - currently rust-lang.o, rust-lex.o
215216
CFLAGS-rust/rust-lang.o += $(RUST_INCLUDES)
@@ -238,3 +239,8 @@ rust/%.o: rust/ast/%.cc
238239
rust/%.o: rust/analysis/%.cc
239240
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
240241
$(POSTCOMPILE)
242+
243+
# build rust/backend files in rust folder
244+
rust/%.o: rust/backend/%.cc
245+
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
246+
$(POSTCOMPILE)

0 commit comments

Comments
 (0)