Index: SConstruct |
diff --git a/SConstruct b/SConstruct |
index 820c1a1c72aef454a6771782bebe1bf87e00c5a6..ca63c299cce947bc1d24e67b67059d12c9d9f0be 100644 |
--- a/SConstruct |
+++ b/SConstruct |
@@ -654,9 +654,18 @@ def GuessToolchain(os): |
return None |
+def GuessVisibility(os, toolchain): |
+ if os == 'win32' and toolchain == 'gcc': |
+ # MinGW can't do it. |
+ return 'default' |
+ else: |
+ return 'hidden' |
+ |
+ |
OS_GUESS = utils.GuessOS() |
TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) |
ARCH_GUESS = utils.GuessArchitecture() |
+VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS) |
SIMPLE_OPTIONS = { |
@@ -762,8 +771,8 @@ SIMPLE_OPTIONS = { |
}, |
'visibility': { |
'values': ['default', 'hidden'], |
- 'default': 'hidden', |
- 'help': 'shared library symbol visibility' |
+ 'default': VISIBILITY_GUESS, |
+ 'help': 'shared library symbol visibility (%s)' % VISIBILITY_GUESS |
}, |
'pgo': { |
'values': ['off', 'instrument', 'optimize'], |