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

Unified Diff: Makefile.standalone

Issue 659513005: Allow conditional lit tests in Subzero, based on build flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix tests to handle MINIMAL builds. 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 | pydir/ifatts.py » ('j') | pydir/ifatts.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile.standalone
diff --git a/Makefile.standalone b/Makefile.standalone
index cb0082cee3a5914a7151e50d27f8346a3bd03d80..0c27fccf1ca914fbcc75182c2a268bc1d9867048 100644
--- a/Makefile.standalone
+++ b/Makefile.standalone
@@ -37,12 +37,25 @@ else
endif
endif
+# The list of attributes associated with the built executable.
+BUILD_ATTS = x86-32
+
ifdef DEBUG
OBJDIR = build/Debug
OPTLEVEL = -O0
+ BUILD_ATTS := $(BUILD_ATTS) debug
else
OBJDIR = build/Release
OPTLEVEL = -O2
+ BUILD_ATTS := $(BUILD_ATTS) release
+endif
+
+ifdef MINIMAL
+ ASSERTIONS := $(ASSERTIONS) -DNO_TEXT_ASM -DNO_DUMP -DNO_LLVM_CL
Jim Stichnoth 2014/10/15 22:23:54 Maybe name this DEFINES instead of ASSERTIONS, or
Karl 2014/10/16 16:51:48 Refactored to use CXX_DEFINES.
+ OBJDIR := $(OBJDIR)+Min
+ BUILD_ATTS := $(BUILD_ATTS) minimal p2i
jvoung (off chromium) 2014/10/15 21:57:05 It seems like the builds should always have "p2i"
Karl 2014/10/16 16:51:48 I tried to make the decision logic needed for test
jvoung (off chromium) 2014/10/20 17:36:00 Ah, what I meant was actually that a list of featu
Karl 2014/10/20 21:00:42 Talked with Jim, and decided that: 1) We assume t
+else
+ BUILD_ATTS := $(BUILD_ATTS) nonminimal p2i l2i lc2i
endif
ifdef NOASSERT
@@ -50,6 +63,7 @@ ifdef NOASSERT
else
ASSERTIONS =
OBJDIR := $(OBJDIR)+Asserts
+ BUILD_ATTS := $(BUILD_ATTS) asserts
endif
$(info -----------------------------------------------)
@@ -103,15 +117,17 @@ OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS))
# Keep all the first target so it's the default.
all: $(OBJDIR)/llvm2ice make_symlink
-make_symlink: $(OBJDIR)/llvm2ice
- rm -f llvm2ice
+make_symlink: $(OBJDIR)/llvm2ice $(OBJDIR)/llvm2ice.build_atts
+ rm -f llvm2ice llvm2ice.build_atts
ln -s $(OBJDIR)/llvm2ice
+ ln -s $(OBJDIR)/llvm2ice.build_atts
.PHONY: all make_symlink
$(OBJDIR)/llvm2ice: $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -ldl \
-Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
+ echo "$(BUILD_ATTS)" > $@.build_atts
# TODO: Be more precise than "*.h" here and elsewhere.
$(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def
@@ -149,4 +165,7 @@ format-diff:
$(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i
clean:
- rm -rf llvm2ice *.o build/
+ rm -rf llvm2ice llvm2ice.build_atts *.o $(OBJDIR)
+
+clean-all: clean
+ rm -rf build/
« no previous file with comments | « no previous file | pydir/ifatts.py » ('j') | pydir/ifatts.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698