summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-08-27 21:05:25 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-08-27 21:09:35 (GMT)
commitacf8da81e5c8c735848b1eff2b7928632ee89714 (patch)
tree9291a13ad5a16be0dd35262ef41b471dacefa601 /Sluift
parent1bb607f96e79845ce30dd5590b0d53cc394ac150 (diff)
downloadswift-acf8da81e5c8c735848b1eff2b7928632ee89714.zip
swift-acf8da81e5c8c735848b1eff2b7928632ee89714.tar.bz2
Set visibility of exported functions when using GCC/CLang.
This currently has no effect yet, but when we will add the flag -fvisibility=hidden, this will give the same results when building DLLs on Linux, Mac OS X and Windows with respect to exporting of symbols. Change-Id: I9ab65b2f9ca78ec242ddac5a14d0f8d72721a6ca
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/sluift.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Sluift/sluift.h b/Sluift/sluift.h
index 4e0f5ee..b82e1c4 100644
--- a/Sluift/sluift.h
+++ b/Sluift/sluift.h
@@ -8,6 +8,8 @@
#if defined(SLUIFT_BUILD_DLL)
#define SLUIFT_API __declspec(dllexport)
+#elif __GNUC__ >= 4
+#define SLUIFT_API __attribute__((visibility("default")))
#else
#define SLUIFT_API
#endif