diff options
| author | Jeffrey Yasskin <[email protected]> | 2010-07-20 11:46:20 +0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-22 01:11:34 +0800 |
| commit | 215060b72b71db9c7ca5810fcf6ebce3d4b04ea3 (patch) | |
| tree | cbd480a57ebd065c067f44e5667a54ad101a336d | |
| parent | Fix -Wnon-virtual-destructor, which apple's gcc-4.0 seems to turn on by default. (diff) | |
| download | rust-215060b72b71db9c7ca5810fcf6ebce3d4b04ea3.tar.xz rust-215060b72b71db9c7ca5810fcf6ebce3d4b04ea3.zip | |
Teach the makefile to generate .ll files,
which are helpful in debugging the llvm backend. Also tell git to ignore
LLVM's intermediate files.
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | src/Makefile | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -13,6 +13,8 @@ *.dSYM *.d *.o +*.ll +*.bc *.aux *.cp *.fn diff --git a/src/Makefile b/src/Makefile index ad82fec2..0cde6221 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 @@ -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 $@ $< |