[PATCH] D29783: Add cmake build support for lsan on OS X

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 14:12:01 PST 2017


kubamracek added inline comments.


================
Comment at: cmake/config-ix.cmake:167-171
+if(APPLE)
+  set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${ARM64})
+else()
+  set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})
+endif()
----------------
fjricci wrote:
> kubamracek wrote:
> > fjricci wrote:
> > > kubamracek wrote:
> > > > Why exactly do we need this change?  Will the 32-bit x86 slice fail to build?
> > > Yeah, `__thread` is only supported on 64-bit darwin targets.
> > Are you sure?
> > 
> > ```
> > $ uname
> > Darwin
> > $ echo "__thread int hello; int main() { hello = 42; }" | clang -x c -arch i386 -
> > $ ./a.out
> > $ # works fine
> > ```
>   $ echo "__thread int hello; int main() { hello = 42; }" | clang -x c -arch i386 -miphoneos-version-min=8.0 -
>   <stdin>:1:1: error: thread-local storage is not supported for the current target
>   __thread int hello; int main() { hello = 42; }
>   ^
> 
> It looks like i386 support isn't added until -miphoneos-version-min=9.0, and I'm not sure that we want to bump the version that high.
Okay, please add a comment explaining this.


https://reviews.llvm.org/D29783





More information about the llvm-commits mailing list