[llvm-commits] Fixing the libc++ cmake build (Mac OS)

Marshall Clow mclow.lists at gmail.com
Thu Sep 6 09:13:55 PDT 2012


On Mac OS, the libc++ build is currently broken.
It fails when linking, with a list of undefined references.
The problem is that it needs to link against libc++abi.

This patch fixes that, but I'm not 100% convinced that it is the best way. (I am not a cmake guru)
Comments?

> Index: lib/CMakeLists.txt
> ===================================================================
> --- lib/CMakeLists.txt	(revision 163313)
> +++ lib/CMakeLists.txt	(working copy)
> @@ -37,7 +37,9 @@
>  append_if(libraries LIBCXX_HAS_M_LIB m)
>  append_if(libraries LIBCXX_HAS_RT_LIB rt)
>  append_if(libraries LIBCXX_HAS_GCC_S_LIB gcc_s)
> +append_if(libraries APPLE c++abi)
>  
> +
>  target_link_libraries(cxx ${libraries})
>  
>  # Setup flags.
> 

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the llvm-commits mailing list