<div dir="ltr">Hi Chris,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 24, 2015 at 2:58 PM, Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.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">I will update the patches shortly.<br>
<span class=""><br>
<br>
================<br>
Comment at: cmake/Modules/CompilerRTDarwinUtils.cmake:2<br>
@@ +1,3 @@<br>
+# On OS X SDKs can be installed anywhere on the base system and xcode-select<br>
+# or SDKROOT can be used to set the default one to use. We want to find the SDKs<br>
+# that are present in the current Xcode<br>
----------------<br>
</span><span class="">filcab wrote:<br>
> This seems misleading. xcodebuild doesn't seem to honour SDKROOT.<br>
><br>
> If I have 10.10 and 10.9 installed, and set SDKROOT=/.../Xcode.app/.../MacOSX10.9.sdk, I get:<br>
>   [~]% xcodebuild -version -sdk macosx Path<br>
>   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk<br>
><br>
> (This is really handy when you have an SDK available for 10.(X+1), but are running on 10.X.<br>
</span>I'll reword. Xcodebuild doesn't respect SDKROOT if you specify -sdk, which is why you would see that behavior.<br></blockquote><div>Fair enough. Do you happen to know if there's a way (other than moving the 10.(X+1) sdk out of the way) to have my use-case work? (Just curious. It's not something that happens a lot (a few months per year, at most ;-) ).</div><div><br></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"><span class="">================<br>
Comment at: lib/asan/CMakeLists.txt:116<br>
@@ -115,3 +115,3 @@<br>
     add_compiler_rt_darwin_dynamic_runtime(clang_rt.asan_${os}_dynamic ${os}<br>
-      ARCHS ${ASAN_SUPPORTED_ARCH}<br>
+      ARCHS ${SANITIZER_COMMON_DARWIN_${os}_ARCHES}<br>
       SOURCES $<TARGET_OBJECTS:RTAsan.${os}><br>
----------------<br>
</span><span class="">filcab wrote:<br>
> Just to be sure, ASan will be supported on all of the arch + OS that sanitizer_common will run on? (at first sight, it almost looks like a copy-paste bug)<br>
><br>
> You're adding object_libraries (line 80) for ASAN_SUPPORTED_ARCH, but then generate dynamic_runtimes for SANITIZER_COMMON_..._ARCHES. Shouldn't these be the same, at least?<br>
</span>Anna would have to comment as to what ASan will or won't be supported on. I'm just trying to make it build, and ASAN_SUPPORTED_ARCH is set to i386;x86_64, which just doesn't work on iOS. For Darwin we always need platform-specific arch settings.<br>
<br>
The line 80 thing is just an oddity of the moment. If you look at add_compiler_rt_object_libraries, it actually ignores the ARCH setting that comes in because it needs platform-specific archs.<br></blockquote><div>Fair enough. Can you please double check AddCompilerRT.cmake:42, then?</div><div>It's setting the property OSX_ARCHITECTURES to ${LIB_ARCHS}. Please double-check if we care about it (It's used for CMake's Xcode generator, and "Local Generator", which I have no idea what it's for :-) ).</div><div><br></div><div>Thanks,</div><div><br></div><div> Filipe</div>







<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">
<span class=""><br>
================<br>
Comment at: lib/ubsan/CMakeLists.txt:47<br>
@@ -46,3 +46,3 @@<br>
       add_compiler_rt_darwin_dynamic_runtime(clang_rt.ubsan_${os}_dynamic ${os}<br>
-        ARCHS ${UBSAN_SUPPORTED_ARCH}<br>
+        ARCHS ${SANITIZER_COMMON_DARWIN_${os}_ARCHES}<br>
         SOURCES $<TARGET_OBJECTS:RTUbsan.${os}><br>
----------------<br>
</span><span class="">filcab wrote:<br>
> Just to be sure, UBSan will be supported on all of the arch + OS that sanitizer_common will run on?<br>
><br>
> Same comment as ASan (check line 42 here).<br>
</span>Again, I can't really comment about official support. I'm just trying to make it build and you can't build UBSan for iOS targeting x86.<br>
<br>
My goal in these patches was to identify up front the architectures that your host toolchain is capable of targeting for each target OS, and build everything for all of them.<br>
<div class=""><div class="h5"><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10710&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=BCwDoI4vIwTqK63av-MBUKQBWn8OdJoCvb0brQcgf04&s=tBEQVfO8BbuB8FGxcYNOX0or9AzR7hgbMtGrrmWZSew&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10710</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=BCwDoI4vIwTqK63av-MBUKQBWn8OdJoCvb0brQcgf04&s=28LNEO_DH4oPHhdDRWMv_k105_ew9fOAGQpC0Cf205c&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>