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/ |