Skip to content

Commit

Permalink
removing dependence on GNU sed in the example
Browse files Browse the repository at this point in the history
  • Loading branch information
kavon committed Nov 20, 2016
1 parent 79c00ad commit abe7724
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# on OS X, install it from macports
GNU_SED := gsed

OPT_CLANG := -O3
CC := gcc
OPT_CC := -O3
OPT_LLC := -O3

all: a.out

a.out: ../dist/llvm-statepoint-tablegen.a fib.o driver.o shim.s
clang $(OPT_CLANG) $^
$(CC) $(OPT_CC) $^

fib.o: fib.ll
llc $(OPT_LLC) fib.ll
$(GNU_SED) "s/__LLVM_StackMaps:/ .globl __LLVM_StackMaps\n__LLVM_StackMaps:/" fib.s > fib_globl.s
clang $(OPT_CLANG) -c fib_globl.s -o fib.o
llc fib.ll -o fib.s
perl -i -pe "s/__LLVM_StackMaps:/.globl __LLVM_StackMaps\n__LLVM_StackMaps:/" fib.s
$(CC) -c fib.s -o fib.o

driver.o: driver.c
clang $(OPT_CLANG) -c driver.c -o driver.o
$(CC) $(OPT_CC) -c driver.c -o driver.o

../dist/llvm-statepoint-tablegen.a:
cd .. && make

clean:
rm -f fib.s fib_globl.s fib.o driver.o a.out
rm -f fib.s fib.o driver.o a.out

0 comments on commit abe7724

Please sign in to comment.