Index: Makefile.standalone |
diff --git a/Makefile.standalone b/Makefile.standalone |
index cb0082cee3a5914a7151e50d27f8346a3bd03d80..9703b6eebf4823e3d9948556e4b5747f9e0c49ee 100644 |
--- a/Makefile.standalone |
+++ b/Makefile.standalone |
@@ -100,12 +100,21 @@ SRCS= \ |
OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) |
+ |
+MINOBJDIR=$(OBJDIR)/min |
+ |
+MINOBJS=$(patsubst %.cpp, $(MINOBJDIR)/%.o, $(SRCS)) |
+ |
+MIN_CXXFLAGS = -DBUILD_MIN_LLVM |
Jim Stichnoth
2014/10/13 16:03:58
LLVM?
Maybe something like SZ_MINIMAL?
jvoung (off chromium)
2014/10/13 17:05:08
SHAVED_ICE
just kidding
Karl
2014/10/14 22:54:12
Done.
|
+ |
# Keep all the first target so it's the default. |
-all: $(OBJDIR)/llvm2ice make_symlink |
+all: $(OBJDIR)/llvm2ice $(MINOBJDIR)/llvm2ice make_symlink |
-make_symlink: $(OBJDIR)/llvm2ice |
+make_symlink: $(OBJDIR)/llvm2ice $(MINOBJDIR)/llvm2ice |
Jim Stichnoth
2014/10/13 16:03:58
I'm not thrilled about the build time doubling. W
jvoung (off chromium)
2014/10/13 17:05:08
If it helps, lit's llvm/utils/lit/lit/TestRunner.p
Karl
2014/10/14 22:54:12
Made code dependent of command-line flag: "MINIMAL
|
rm -f llvm2ice |
ln -s $(OBJDIR)/llvm2ice |
+ rm -f minllvm2ice |
+ ln -s $(MINOBJDIR)/llvm2ice minllvm2ice |
.PHONY: all make_symlink |
@@ -122,6 +131,18 @@ $(OBJS): | $(OBJDIR) |
$(OBJDIR): |
@mkdir -p $@ |
+$(MINOBJDIR)/llvm2ice: $(MINOBJS) |
+ $(CXX) $(MIN_CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -ldl \ |
+ -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
+ |
+$(MINOBJS): $(MINOBJDIR)/%.o: src/%.cpp src/*.h src/*.def |
+ $(CXX) -c $(MIN_CXXFLAGS) $(CXXFLAGS) $< -o $@ |
+ |
+$(MINOBJS): | $(MINOBJDIR) |
+ |
+$(MINOBJDIR): $(OBJDIR) |
+ @mkdir -p $@ |
+ |
check-lit: llvm2ice make_symlink |
LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ |
$(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit |
@@ -149,4 +170,4 @@ format-diff: |
$(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i |
clean: |
- rm -rf llvm2ice *.o build/ |
+ rm -rf llvm2ice minllvm2ice *.o build/ |