Index: Makefile.standalone |
diff --git a/Makefile.standalone b/Makefile.standalone |
index 6e8edf7256207f067e41bafb20bcfc29680dc4bc..d86aeaff83ed58327796be906a36676b1ce90762 100644 |
--- a/Makefile.standalone |
+++ b/Makefile.standalone |
@@ -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 \ |