Skip to content

Commit e66d1de

Browse files
committed
Warn the user of the visibility problem.
1 parent 4db3474 commit e66d1de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

driver/utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
189189
'-nodefaultlibs' : (0, ArgumentListFilter.linkUnaryCallback),
190190
# darwin flags
191191
'-dynamiclib' : (0, ArgumentListFilter.linkUnaryCallback),
192+
# need to warn the darwin user that this one will rain on their parade
193+
'-fvisibility=hidden' : (0, ArgumentListFilter.darwinWarningCallback),
194+
192195
}
193196

194197
#
@@ -317,6 +320,13 @@ def linkUnaryCallback(self, flag):
317320
def compileUnaryCallback(self, flag):
318321
self.compileArgs.append(flag)
319322

323+
def darwinWarningCallback(self, flag):
324+
if sys.platform.startswith('darwin'):
325+
_logger.warning('The flag "{0}" cannot be used with this tool'.format(flag))
326+
sys.exit(1)
327+
else:
328+
self.compileArgs.append(flag)
329+
320330
def defaultBinaryCallback(self, flag, arg):
321331
_logger.warning('Ignoring compiler arg pair: "{0} {1}"'.format(flag, arg))
322332

0 commit comments

Comments
 (0)