Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apple discourages use of the `-flat_namespace` flag, and it exists only for compatibility with very old versions of OS X. Using `-flat_namespace` can cause various cryptic linker errors (e.g. due to name collisions), so it's best to avoid its use unless needed. This change removes the flag, and also changes `-undefined suppress` to `-undefined dynamic_lookup`. We need to change the argument to `-undefined` because omitting the `-flat_namespace` flag will build shared libraries with a two-level namespace, and this does not support `-undefined suppress`. `dynamic_lookup` means that the dynamic linker will resolve undefined symbols at runtime. This should have no visible impact on any users who do not explicitly exploit the flat namespace, but this is of often only useful for debugging purposes. Users who need this still have alternatives such as setting `DYLD_FORCE_FLAT_NAMESPACE`, which instructs the linker to treat libraries as if they were compiled with a flat namespace.
- Loading branch information