[llvm-dev] Building LLVM 3.7.1 on OS X

Jack Howarth via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 25 10:56:11 PST 2016


Antoine,
      The llvm 3.7.1 build requires Apple Clang 5.0 or later which can
be gotten from Xcode 5.1 on 10.8. In general, it is best to keep your
OS X upgraded to the latest release supported on the hardware for
building llvm. For example, llvm 3.8 currently requires Xcode 7
(available on OS X 10.10 or 10.11) in order to build the new tsan
support in compiler-rt or using
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON to use the just built
compiler.
               Jack

On Mon, Jan 25, 2016 at 11:22 AM, Antoine Pitrou via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> Hello,
>
> I haven't found any relevant info in the docs about this. I'm trying to
> build LLVM 3.7.1 on OS X but it fails in the configuration phase. Here
> are the relevant parts of the output:
>
> $ cmake -DCMAKE_INSTALL_PREFIX=/Volumes/HD2/jenkins/workspace/LLVMDev/label/osxbuild/miniconda/envs/_build -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF ..
> -- The C compiler identification is AppleClang 4.1.0.4211166
> -- The CXX compiler identification is AppleClang 4.1.0.4211166
> [...]
> -- Looking for __atomic_fetch_add_4 in atomic
> -- Looking for __atomic_fetch_add_4 in atomic - not found
> CMake Error at cmake/modules/CheckAtomic.cmake:36 (message):
>   Host compiler appears to require libatomic, but cannot find it.
> Call Stack (most recent call first):
>   cmake/config-ix.cmake:291 (include)
>   CMakeLists.txt:360 (include)
>
>
> How is libatomic supposed to be installed on OS X?
> (perhaps it's somewhat of a newbie question - I'm not a OS X user...)
>
> Thank you,
>
> Antoine.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list