diff options
-rw-r--r-- | Driver/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Driver/Makefile b/Driver/Makefile index 22d7ffbfb5..d4b939052c 100644 --- a/Driver/Makefile +++ b/Driver/Makefile @@ -8,6 +8,12 @@ CXXFLAGS = -fno-rtti # early so we can set up LINK_COMPONENTS before including Makefile.rules include $(LEVEL)/Makefile.config +# Optimize startup time of the app by not exporting all of the weak symbols +# from the binary. This reduces dyld startup time by 4x. +ifeq ($(OS),Darwin) +LD.Flags += -Wl,-exported_symbol -Wl,_main +endif + LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader bitwriter codegen ipo selectiondag USEDLIBS = clangCodeGen.a clangAnalysis.a clangRewrite.a clangSema.a \ clangDriver.a clangAST.a clangParse.a clangLex.a \ |