mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
strip exported symbols from tools that build with TOOL_NO_EXPORTS=1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
843daf40b6
commit
61863a3d3d
@ -1066,6 +1066,24 @@ else
|
|||||||
ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
|
ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#---------------------------------------------------------
|
||||||
|
# Prune Exports
|
||||||
|
#---------------------------------------------------------
|
||||||
|
|
||||||
|
# If the tool opts in with TOOL_NO_EXPORTS, optimize startup time of the app by
|
||||||
|
# not exporting all of the weak symbols from the binary. This reduces dyld
|
||||||
|
# startup time by 4x on darwin in some cases.
|
||||||
|
ifdef TOOL_NO_EXPORTS
|
||||||
|
ifeq ($(OS),Darwin)
|
||||||
|
LD.Flags += -Wl,-exported_symbol -Wl,_main
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OS), $(filter $(OS), Linux NetBSD FreeBSD))
|
||||||
|
LD.Flags += -Wl,--version-script=Driver.map
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
# Provide targets for building the tools
|
# Provide targets for building the tools
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user