-fvisibility=hidden not passed by compiler for Debug builds

I am building a project in which I have enabled GCC_INLINES_ARE_PRIVATE_EXTERN and GCC_SYMBOLS_PRIVATE_EXTERN because I am consuming static libraries that were pre-built with those flags on.

However, when I build my project for Debug -fvisibility=hidden is not included in the compiler flags, but it does get included when I build my project for Release.

Is there any other flag that I need to turn on to make this happen?


Seems like an Xcode bug. I didn’t find any other solution that setting OTHER_CFLAGS explicitly (in debug build only, on the same level GCC_INLINES_ARE_PRIVATE_EXTERN is set) to override it:

OTHER_CFLAGS = "-fvisibility=hidden";


This is old, but it it seems the conflict comes from the Enable Testability setting. If you turn that off, then -fvisibility=hidden will work properly. It seems that Enable Testability has higher precedence over GCC_SYMBOLS_PRIVATE_EXTERN.

If you need that setting, you can always modify the settings on a configuration basis and mix and match (ie. Enable Testability is on and OTHER_CFLAGS containing -fvisibility=hidden)


  • ICU library in Android NDK
  • Is there any way to override the -fvisibility=hidden at link time?
  • Context menu disappears when opened with Key.App
  • How to restrict number of concurrent processes?
  • How to run Java in compatibility mode?
  • Can I apply the Git-Flow workflow on GitHub
  • PhoneGap : How to upload APK files on Google Play Store
  • Spring Integration debounce/deduplicate
  • “[CALayer release]: message sent to deallocated instance” when dismissing modal view controller
  • Creating a setup.exe in InstallShield in Visual Studio
  • include dlls in visual studio c++ 2008
  • Cannot find “Grammar.txt” in python-sphinx
  • Get Currently Active User in Android
  • insert radio value multiple data codeigniter in database to one row?
  • C# Excel interop - how to test if interop object is still working and performing a task?
  • Universal Image Loader reuse images
  • Does Apportable support to build library binary (.a/.so)?
  • Exception gevent.hub.LoopExit: LoopExit('This operation would block forever',)
  • Why does java tzupdater add leap seconds?
  • how to set variables in a php include file?
  • How to make R's read_csv2() recognise the text characters properly
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • Eloquent paginate function in Slim 3 project using twig
  • Can I check if a recipient has an automatic reply before I send an email?
  • Cannot resolve symbol 'MyApi'
  • CSS Linear-gradient formatting issue accross different browsers
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Getting last autonumber in access
  • swift auto completion not working in Xcode6-Beta
  • Trying to switch camera back to front but getting exception
  • Convert array of 8 bytes to signed long in C++
  • Statically linking a C++ library to a C# process using CLI or any other way
  • Adding custom controls to a full screen movie
  • C# - Getting references of reference
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • How can I remove ASP.NET Designer.cs files?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Busy indicator not showing up in wpf window [duplicate]
  • Net Present Value in Excel for Grouped Recurring CF