[llvm-dev] Availability of "-export_dynamic" when compiling with support for older OS X releases

ardi via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 13 03:57:30 PDT 2016

On Tue, Apr 12, 2016 at 3:48 PM, ardi <ardillasdelmonte at gmail.com> wrote:
> Is there any way I can build LLVM 3.4.2 in El Capitan, specifying that
> the linker will be the one from 10.6.8?

In case anybody else faces this problem, if you build LLVM on a recent
OS X release but specifying the deployment target to an older OS X
version, when you run such build on the older OS X version, you need
to specify -mlinker-version=97.17 as an option to clang/clang++ if the
-rdynamic flag is also used. Otherwise, it will call the linker
supposing it's a newer one, and it will fail because of unsupported

It's somewhat uncomfortable to specify -mlinker-version=97.17 on each
clang/clang++ invocation, but at least it fixes this problem and it


More information about the llvm-dev mailing list