Skip to content

Commit

Permalink
Fix Makefile missing libPolly & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcd1230 committed Jul 21, 2021
1 parent ca92b10 commit c63ea21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ LLVM_LIBRARY_FLAGS += -lclangFrontend -lclangDriver \
-lclangAnalysis \
-lclangEdit -lclangAST -lclangLex -lclangBasic

CLANG_AST_MATCHERS = "80 90 100 110 111"
CLANG_AST_MATCHERS = "80 90 100 110 111 120"
ifneq (,$(findstring $(LLVM_VERSION),$(CLANG_AST_MATCHERS)))
LLVM_LIBRARY_FLAGS += -lclangASTMatchers
endif
Expand Down Expand Up @@ -229,9 +229,15 @@ release/include/terra/%.h: $(LUAJIT_INCLUDE)/%.h $(LUAJIT_LIB)

build/llvm_objects/llvm_list: $(addprefix build/, $(LIBOBJS) $(EXEOBJS))
mkdir -p build/llvm_objects/luajit
$(CXX) -o /dev/null $(addprefix build/, $(LIBOBJS) $(EXEOBJS)) $(LLVM_LIBRARY_FLAGS) $(SUPPORT_LIBRARY_FLAGS) $(LFLAGS) -Wl,-t 2>&1 | egrep "lib(LLVM|clang)" > build/llvm_objects/llvm_list
$(CXX) -o /dev/null $(addprefix build/, $(LIBOBJS) $(EXEOBJS)) $(LLVM_LIBRARY_FLAGS) $(SUPPORT_LIBRARY_FLAGS) $(LFLAGS) -Wl,-t 2>&1 | egrep "lib(LLVM|clang|Polly)" > build/llvm_objects/llvm_list
# extract needed LLVM objects based on a dummy linker invocation
< build/llvm_objects/llvm_list $(LUAJIT) src/unpacklibraries.lua build/llvm_objects
cd build/llvm_objects; for lib in $$(cat llvm_list); do \
DIR=$$(basename $$lib .a); \
mkdir -p $$DIR; \
pushd $$DIR; \
ar x $$lib; \
popd; \
done
# include all luajit objects, since the entire lua interface is used in terra


Expand Down
25 changes: 0 additions & 25 deletions src/unpacklibraries.lua

This file was deleted.

0 comments on commit c63ea21

Please sign in to comment.