[LLVMdev] CMake, compiler-rt, and MacOS

Chandler Carruth chandlerc at google.com
Tue Feb 5 00:16:10 PST 2013


On Mon, Feb 4, 2013 at 6:21 AM, Erik Verbruggen <erik.verbruggen at me.com>wrote:

> Hi Chandler,
>
> If I remember correctly, you are the de-facto maintainer for the
> CMake-built-mainainer, so..:
>

Sure, but I'm often busy. You're better off using the development mailing
list for questions such as this, and I've moved the conversation there.


> I have a problem compiling compiler-rt on MacOS with libc++. For this to
> work, the flag -mmacosx-version-min=10.7 is required, so I use:
> CMAKE_CXX_FLAGS:STRING=-mmacosx-version-min=10.7 -stdlib=libc++
>
> However, around line 140, the CMakeLists.txt of compiler-rt contains:
> if(APPLE)
>   list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5)
> endif()
>
> Now, when building with clang, the minimal minimal version is used, so
> 10.5, which results in a compiler error complaining that the minimal
> version should be 10.7.
>
> My question: could you please add some CMake logic to the compiler-rt
> CMakeLists.txt to check if there is already a macosx-version-min flag set,
> or to not include the flag if -stdlib=libc++ is set?
>

I don't know the specific needs of either libc++ or the sanitizer on mac;
instead this should be answered by one of the folks actively working on
that area. There are several on the list that can likely help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130205/5e9eeed9/attachment.html>


More information about the llvm-dev mailing list