summaryrefslogtreecommitdiff
path: root/numpy/core/setup.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-11-23 18:05:10 -0600
committerGitHub <noreply@github.com>2018-11-23 18:05:10 -0600
commit5287788713133ca467a3f585dad371dc188dc6b2 (patch)
tree0df97c3255f4360aa8d811ca8a1d97f09f860965 /numpy/core/setup.py
parent32271a6407aa9c0542072f6e812e9ce79324e1a4 (diff)
parent51e9a0283e3a0919ffb3e0243c605d0d4a6d3c47 (diff)
downloadnumpy-5287788713133ca467a3f585dad371dc188dc6b2.tar.gz
Merge pull request #12439 from mattip/visible-to-invisible
BUG: test, fix NPY_VISIBILITY_HIDDEN on gcc, which becomes NPY_NO_EXPORT
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r--numpy/core/setup.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index efcacfb8e..23a9e268b 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -379,8 +379,9 @@ def check_mathlib(config_cmd):
def visibility_define(config):
"""Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty
string)."""
- if config.check_compiler_gcc4():
- return '__attribute__((visibility("hidden")))'
+ hide = '__attribute__((visibility("hidden")))'
+ if config.check_gcc_function_attribute(hide, 'hideme'):
+ return hide
else:
return ''