Skip to content

Commit 3ee1720

Browse files
authored
Merge pull request #14 from philberty/phil/compilation-simple
This sets up the conversion from AST to GCC
2 parents 4c9b89f + d1a71a1 commit 3ee1720

8 files changed

+943
-35
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

@@ -206,7 +207,7 @@ CFLAGS-rust/rust-lang.o += -DDEFAULT_TARGET_VERSION=\"$(version)\" \
206207
-DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\"
207208

208209
# cross-folder includes - add new folders later
209-
RUST_INCLUDES = -I $(srcdir)/rust -I $(srcdir)/rust/lex -I $(srcdir)/rust/parse -I $(srcdir)/rust/ast -I $(srcdir)/rust/analysis
210+
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
210211

211212
# add files that require cross-folder includes - currently rust-lang.o, rust-lex.o
212213
CFLAGS-rust/rust-lang.o += $(RUST_INCLUDES)
@@ -235,3 +236,8 @@ rust/%.o: rust/ast/%.cc
235236
rust/%.o: rust/analysis/%.cc
236237
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
237238
$(POSTCOMPILE)
239+
240+
# build rust/backend files in rust folder
241+
rust/%.o: rust/backend/%.cc
242+
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
243+
$(POSTCOMPILE)

0 commit comments

Comments
 (0)