Index: Makefile.standalone |
diff --git a/Makefile.standalone b/Makefile.standalone |
index b0addadf436e4c3c5f3bf7078b3f643588056d14..2d3c0add27f26bda653b4761ad309b9c8407acea 100644 |
--- a/Makefile.standalone |
+++ b/Makefile.standalone |
@@ -18,9 +18,19 @@ LLVM_SRC_PATH ?= ../llvm |
LLVM_BIN_PATH ?= $(shell readlink -e \ |
../../out/llvm_i686_linux_work/Release+Asserts/bin) |
+HOST_ARCH ?= x86 |
+ifeq ($(HOST_ARCH),x86_64) |
+ HOST_FLAGS = -m64 |
+else |
+ ifeq ($(HOST_ARCH),x86) |
+ HOST_FLAGS = -m32 |
+ endif |
+endif |
+ |
$(info -----------------------------------------------) |
$(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) |
$(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH)) |
+$(info Using HOST_ARCH = $(HOST_ARCH)) |
$(info -----------------------------------------------) |
LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags` |
@@ -29,9 +39,11 @@ LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --ldflags --libs` |
# It's recommended that CXX matches the compiler you used to build LLVM itself. |
OPTLEVEL := -O0 |
CXX := g++ |
+ |
CXXFLAGS := -Wall -Wextra -Werror -fno-rtti -fno-exceptions \ |
- $(OPTLEVEL) -g $(LLVM_CXXFLAGS) -m32 -Wno-error=unused-parameter |
-LDFLAGS := -m32 |
+ $(OPTLEVEL) -g $(LLVM_CXXFLAGS) $(HOST_FLAGS) \ |
+ -Wno-error=unused-parameter |
+LDFLAGS := $(HOST_FLAGS) |
SRCS= \ |
IceCfg.cpp \ |