Skip to content

Commit

Permalink
Teach the makefile to generate .ll files,
Browse files Browse the repository at this point in the history
which are helpful in debugging the llvm backend.  Also tell git to ignore
LLVM's intermediate files.
  • Loading branch information
jyasskin authored and graydon committed Jul 21, 2010
1 parent 068c71f commit 215060b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -13,6 +13,8 @@
*.dSYM
*.d
*.o
*.ll
*.bc
*.aux
*.cp
*.fn
Expand Down
6 changes: 6 additions & 0 deletions src/Makefile
Expand Up @@ -189,6 +189,7 @@ ifdef CFG_LLVM_CONFIG
lltrans.ml llemit.ml)
LLC := "$(shell $(CFG_LLVM_CONFIG) --bindir)/llc"
CFG_LLC_CFLAGS := -march=x86
LLVM-DIS := "$(shell $(CFG_LLVM_CONFIG) --bindir)/llvm-dis"
$(info cfg: found llvm-config at $(CFG_LLVM_CONFIG))
else
VARIANT=x86
Expand Down Expand Up @@ -664,6 +665,11 @@ test/bench/shootout/%.x86$(CFG_EXE_SUFFIX): test/bench/shootout/%.rs $(REQ)
@$(call CFG_ECHO, compile [x86]: $<)
$(BOOT) -o $@ $<

%.ll: %.bc
@$(call CFG_ECHO, dis [llvm]: $<)
$(CFG_QUIET)$(LLVM-DIS) -o $@ $<


%.s: %.bc
@$(call CFG_ECHO, compile [llvm]: $<)
$(CFG_QUIET)$(LLC) $(CFG_LLC_CFLAGS) -o $@ $<
Expand Down

0 comments on commit 215060b

Please sign in to comment.