<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 5, 2013, at 15:14, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 5, 2013 at 12:38 PM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div dir="ltr">+samsonov, glider</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Feb 5, 2013 at 12:16 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div class="h5"><div dir="ltr">On Mon, Feb 4, 2013 at 6:21 AM, Erik Verbruggen <span dir="ltr"><<a href="mailto:erik.verbruggen@me.com" target="_blank">erik.verbruggen@me.com</a>></span> wrote:<br>

<div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">Hi Chandler,<br>
<br>
If I remember correctly, you are the de-facto maintainer for the CMake-built-mainainer, so..:<br></blockquote><div><br></div><div>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.</div>


<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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:<br>



CMAKE_CXX_FLAGS:STRING=-mmacosx-version-min=10.7 -stdlib=libc++<br>
<br>
However, around line 140, the CMakeLists.txt of compiler-rt contains:<br>
if(APPLE)<br>
  list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5)<br>
endif()<br>
<br>
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.<br>
<br>
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?<br></blockquote></div>
</div></div></div></blockquote></div></div></blockquote><div><br></div><div style="">Hi Erik,</div><div style="">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</div>
<div style="">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</div><div style="">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.</div></div></div></div></blockquote><br></div><div>Yes, that works, when I (manually) set the COMPILER_RT_USES_LIBCXX flag. I was wondering if that flag could actually be set when detecting the -stdlib=libc++ flag...</div><div><br></div><div>-- Erik.</div><div><br></div></body></html>