Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: Makefile.standalone

Issue 644143002: Generate a minimal llvm2ice. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests_lit/lit.cfg » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/
« no previous file with comments | « no previous file | tests_lit/lit.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698