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>
+samsonov, glider On Tue, Feb 5, 2013 at 12:16 PM, Chandler Carruth <chandlerc at google.com>wrote:> 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. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130205/030bf2b7/attachment.html>
On Tue, Feb 5, 2013 at 12:38 PM, Kostya Serebryany <kcc at google.com> wrote:> +samsonov, glider > > > On Tue, Feb 5, 2013 at 12:16 PM, Chandler Carruth <chandlerc at google.com>wrote: > >> 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? >>> >>Hi Erik, IIRC, using -stdlib=libc++ on Mac should also require presence of flag -mmacosx-version-min? If that's the case, then probably we can put the logic of determining the set of flags required for libc++ into CMake build rules and use CMake variable like COMPILER_RT_USES_LIBCXX. Does the attached patch solve a problem for you? If you're building LLVM/Clang tree, however, we may want to hoist this to smth. like LLVM_USES_LIBCXX.> >> 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. >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-- Alexey Samsonov, MSK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130205/67115469/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: zpatch.macosx_version Type: application/octet-stream Size: 1433 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130205/67115469/attachment.obj>