Commit a49e9d9c by Jim Stichnoth

Subzero: Build with function/data sections and -gc-sections.

This is consistent with how LLVM is built, and makes it easier to analyze the potential size of a translator build and what may be inappropriately brought into the build. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/783023002
parent 586d4c23
......@@ -42,7 +42,7 @@ ifdef DEBUG
OPTLEVEL = -O0
else
OBJDIR = build/Release
OPTLEVEL = -O2
OPTLEVEL = -O2 -ffunction-sections -fdata-sections
endif
# The list of CXX defines that are dependent on build parameters.
......@@ -86,7 +86,7 @@ CXXFLAGS := $(LLVM_CXXFLAGS) -std=c++11 -Wall -Wextra -Werror -fno-rtti \
-fno-exceptions $(OPTLEVEL) $(ASSERTIONS) $(CXX_DEFINES) -g \
$(HOST_FLAGS) -Wno-error=unused-parameter \
-I$(LIBCXX_INSTALL_PATH)/include/c++/v1
LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib
LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections
SRCS = \
assembler.cpp \
......
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