[PATCH] Working on reconciling out-of-tree patches to compiler-rt for building for iOS.

Alexey Samsonov vonosmas at gmail.com
Tue Jun 23 13:35:07 PDT 2015


================
Comment at: lib/asan/asan_mac.cc:28
@@ +27,3 @@
+#if !SANITIZER_IOS
+#include <crt_externs.h>  // for _NSGetArgv and _NSGetEnviron
+#else
----------------
beanz wrote:
> samsonov wrote:
> > beanz wrote:
> > > samsonov wrote:
> > > > How did this #include for SANITIZER_IOSSIM before this change?
> > > crt_externs.h exists in the iOS Simulator SDK, but not in the device SDK... Don't ask. I have no answers.
> > That's fine, but doesn't this mean we should keep #including <crt_externs.h> on iossim?
> > I'd actually vote for making SANITIZER_IOS and SANITIZER_IOSSIM exclusive. In this case we won't have to care about correct order of #elif clauses in asan_mapping.h
> Six one way half a dozen the other.
> 
> It will work either way. My general preference is to have the Simulator code follow the iOS code paths everywhere except where it is absolutely necessary to deviate, but I could go either way on this.
> 
> I don't think you should make SANITIZER_IOS and SANITIZER_IOSSIM exclusive. The general Darwin model is that the iOS simulator is iOS.
> 
> I could easily change the check here to `#if (!SANITIZER_IOS) || SANITIZER_IOSSIM`.
OK, let's follow the Darwin model here and assume that iossim is ios.

http://reviews.llvm.org/D10515

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list