Commit e837e1a3 by Jan Voung

Subzero makefile changes for linking a static llvm2ice nexe w/ LLVM build sys.

Need to list more dependencies, otherwise the static link fails. The current unsandboxed build is a shared build which uses libLLVM-3.*.so. Also mess with the CXXFlags a bit. The current pnacl-llc nexe build uses O3, but that triggers a method pointer bug: https://code.google.com/p/nativeclient/issues/detail?id=3857, so override that with O2. We may just want to change the pnacl-llc build as well (maybe use Os), but I don't know of the performance implications right now. Use gnu++11, because of newlib + libc++. Toggle the feature flags to be a MINIMAL build when building the sandboxed translator w/ the LLVM-based Makefile. Goes with build script change https://codereview.chromium.org/945473003/ BUG= https://code.google.com/p/nativeclient/issues/detail?id=4091 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3857 R=dschuff@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/937283002
parent c4508791
......@@ -12,9 +12,19 @@ LEVEL := $(SUBZERO_LEVEL)/../..
# Include LLVM common makefile.
include $(LEVEL)/Makefile.common
CXX.Flags += -std=c++11
CPP.Defines += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \
-DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1 \
-DALLOW_MINIMAL_BUILD=0
# -O3 seems to trigger the following PNaCl ABI transform bug
# on method pointers, so override that with -O2:
# https://code.google.com/p/nativeclient/issues/detail?id=3857
CXX.Flags += -O2
# Newlib paired with libc++ requires gnu.
CXX.Flags += -std=gnu++11
ifeq ($(PNACL_BROWSER_TRANSLATOR),1)
CPP.Defines += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \
-DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 \
-DALLOW_MINIMAL_BUILD=1
else
CPP.Defines += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \
-DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1 \
-DALLOW_MINIMAL_BUILD=0
endif
......@@ -97,7 +97,7 @@ LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --libs` \
CCACHE := `command -v ccache`
CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++
CXXFLAGS := $(LLVM_CXXFLAGS) -std=c++11 -Wall -Wextra -Werror -fno-rtti \
CXXFLAGS := $(LLVM_CXXFLAGS) -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \
-fno-exceptions $(OPTLEVEL) $(ASSERTIONS) $(CXX_DEFINES) -g \
$(HOST_FLAGS) -pedantic -Wno-error=unused-parameter \
-I$(LIBCXX_INSTALL_PATH)/include/c++/v1 $(CXX_EXTRA)
......
......@@ -2,7 +2,7 @@
SUBZERO_LEVEL := ..
TOOLNAME := pnacl-sz
LINK_COMPONENTS := support
LINK_COMPONENTS := bitreader naclbitreader irreader naclanalysis nacltransforms support
# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS := 1
......@@ -10,4 +10,3 @@ TOOL_NO_EXPORTS := 1
include $(SUBZERO_LEVEL)/../../Makefile.config
include $(SUBZERO_LEVEL)/Makefile
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment