[libcxx] r243574 - Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"

Eric Fiselier eric at efcs.ca
Thu Jul 30 15:33:14 PDT 2015

FYI I recommitted the working parts of this patch as r243698. I
removed the "HandleLLVMOptions.cmake" include which was causing all of
the problems. Please let me know if anything comes up.


On Thu, Jul 30, 2015 at 4:26 PM, Eric Fiselier <eric at efcs.ca> wrote:
>> What would/does `-DLLVM_USE_SANITIZER=Thread` do differently than `-DCMAKE_CXX_FLAGS=-
>> fsanitize=thread` here?
> Using LLVM_USE_SANITIZER will prevent LLVM from adding certain link
> flags such as '-Wl,-z,defs', '-ffunction-sections' and
> '-fdata-sections' and it will force LLVM to provide some level of
> debug information in RELEASE mode.
> For sanitizers other than Thread, LLVM_USE_SANITIZER will add extra
> flags such as '-fsanitize-no-recover'.
> Also, for libc++, using LLVM_USE_SANITIZER sets the testsuite up to
> run with the sanitizers as well.
> On Thu, Jul 30, 2015 at 4:09 PM, Jonathan Roelofs
> <jonathan at codesourcery.com> wrote:
>> On 7/30/15 12:47 PM, Alexey Samsonov wrote:
>>> I actually support the idea of including LLVM CMake modules from
>>> libc++ CMake: the logic for building instrumented LLVM and building
>>> instrumented libc++ should better be listed in a single place, and be
>>> controlled by LLVM_USE_SANITIZER options: i.e. when we configure
>>> libc++ from compiler-rt, we should pass -DLLVM_USE_SANITIZER=Thread
>>> rather than -DCMAKE_CXX_FLAGS=-fsanitize=thread. It's not possible to
>>> do this right now, though (for instance we build two different
>>> versions of MSan-libc++), but I think I'd be able to work on that
>>> once your patch lands and the dust settles.
>> What would/does `-DLLVM_USE_SANITIZER=Thread` do differently than
>> `-DCMAKE_CXX_FLAGS=-fsanitize=thread` here?
>> Jon
>> --
>> Jon Roelofs
>> jonathan at codesourcery.com
>> CodeSourcery / Mentor Embedded

More information about the cfe-commits mailing list