summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-01-18 22:19:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-01-18 22:19:34 +0000
commit6a571fb3c515c5ea53308ba0eda750e8dd76ef6b (patch)
treec299cf153821aac3c735e744e919a1f349bebe51 /make
parent4c01bb7a1fc5ea65e39a63593d96fa3ef5aaeed4 (diff)
Add a VISIBILITY_HIDDEN option, which can be used to make all compiler-rt function definitions hidden/private extern.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/lib_info.mk3
-rw-r--r--make/options.mk8
-rw-r--r--make/platform/darwin_bni.mk1
-rw-r--r--make/platform/darwin_fat.mk2
-rw-r--r--make/platform/multi_arch.mk2
5 files changed, 14 insertions, 2 deletions
diff --git a/make/lib_info.mk b/make/lib_info.mk
index 91ee23b55..a54152a4f 100644
--- a/make/lib_info.mk
+++ b/make/lib_info.mk
@@ -46,4 +46,5 @@ $(foreach key,$(SubDirKeys),\
# The names of all the available options.
AvailableOptions := AR ARFLAGS \
CC CFLAGS FUNCTIONS OPTIMIZED \
- RANLIB RANLIBFLAGS
+ RANLIB RANLIBFLAGS \
+ VISIBILITY_HIDDEN
diff --git a/make/options.mk b/make/options.mk
index 392bbdde5..f6a331bf0 100644
--- a/make/options.mk
+++ b/make/options.mk
@@ -15,6 +15,14 @@ FUNCTIONS :=
# Whether optimized function implementations should be used.
OPTIMIZED := 1
+# Whether function definitions should use hidden visibility. This adds the
+# -fvisibility=hidden compiler option and uses .private_extern annotations in
+# assembly files.
+#
+# FIXME: Make this more portable. When that is done, it should probably be the
+# default.
+VISIBILITY_HIDDEN := 0
+
# Miscellaneous tools.
AR := ar
diff --git a/make/platform/darwin_bni.mk b/make/platform/darwin_bni.mk
index 952b10474..e713d243d 100644
--- a/make/platform/darwin_bni.mk
+++ b/make/platform/darwin_bni.mk
@@ -50,3 +50,4 @@ FUNCTIONS.armv6 := $(FUNCTIONS) \
subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \
modsi3 umodsi3 udivsi3 divsi3 switch save_restore_d8_d15
+VISIBILITY_HIDDEN := 0
diff --git a/make/platform/darwin_fat.mk b/make/platform/darwin_fat.mk
index cea2a51f2..3659e041f 100644
--- a/make/platform/darwin_fat.mk
+++ b/make/platform/darwin_fat.mk
@@ -51,3 +51,5 @@ FUNCTIONS.armv6 := $(CommonFunctions) $(ArchFunctions.armv6)
FUNCTIONS.armv7 := $(CommonFunctions) $(ArchFunctions.armv7)
OPTIMIZED.Debug := 0
+
+VISIBILITY_HIDDEN := 1
diff --git a/make/platform/multi_arch.mk b/make/platform/multi_arch.mk
index c85f3d904..eebc7b2f8 100644
--- a/make/platform/multi_arch.mk
+++ b/make/platform/multi_arch.mk
@@ -13,4 +13,4 @@ CFLAGS.m32 := $(CFLAGS) -m32 -O3
CFLAGS.m64 := $(CFLAGS) -m64 -O3
FUNCTIONS := moddi3 floatundixf udivdi3
-FUNCTIONS.m64 := $(FUNCTIONS) lshrdi3 \ No newline at end of file
+FUNCTIONS.m64 := $(FUNCTIONS) lshrdi3