Skip to content

Commit

Permalink
This sets up the conversion from AST to GCC
Browse files Browse the repository at this point in the history
It will crash when compiling but its the code setup i want to get in sooner
than later.

Addresses #12
  • Loading branch information
philberty committed May 2, 2020
1 parent 4c9b89f commit c15966b
Show file tree
Hide file tree
Showing 8 changed files with 943 additions and 35 deletions.
8 changes: 7 additions & 1 deletion gcc/rust/Make-lang.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ GRS_OBJS = \
rust/rust-ast-full-test.o \
rust/rust-session-manager.o \
rust/rust-resolution.o \
rust/rust-compile.o \
$(END)
# removed object files from here

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

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

# add files that require cross-folder includes - currently rust-lang.o, rust-lex.o
CFLAGS-rust/rust-lang.o += $(RUST_INCLUDES)
Expand Down Expand Up @@ -235,3 +236,8 @@ rust/%.o: rust/ast/%.cc
rust/%.o: rust/analysis/%.cc
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
$(POSTCOMPILE)

# build rust/backend files in rust folder
rust/%.o: rust/backend/%.cc
$(COMPILE) -std=c++11 $(RUST_INCLUDES) $<
$(POSTCOMPILE)
Loading

0 comments on commit c15966b

Please sign in to comment.