[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
Tue Apr 12 06:48:11 PDT 2016

Looking at tools/clang/lib/Driver/Tools.cpp , there's this fragment of code:

if (Args.hasArg(options::OPT_rdynamic) && Version[0] >= 137)

I built LLVM 3.4.2 from a OS X 10.11 "El Capitan" but specifying a fat
build (386+x86_64) and requesting support back up to 10.6. It went
fine, and the build passes all tests when run on a 10.6.8 machine.

But now, trying to compile LLVM 3.8.0, on 10.6.8, with that LLVM 3.4.2
build, everything goes fine until trying to link bugpoint. Then the
linker reports the -export_dynamic option as an error.

My guess is that when I built 3.4.2 in El Capitan, it found that the
toolchain being used did support "-export_dynamic", but, however I
wasn't interested in that toolchain, but in the system standard linker
in 10.6.8.

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?


More information about the llvm-dev mailing list