libcxx 'LLVM_USE_SANITIZER=Address;Undefined'
authorBrian Gesiak <modocache@gmail.com>
Sat, 4 Apr 2020 17:01:32 +0000 (13:01 -0400)
committerBrian Gesiak <modocache@gmail.com>
Sat, 4 Apr 2020 20:28:41 +0000 (16:28 -0400)
commit54176d1766f25bc03ddb1a8932a380f6543d5150
tree4d638dcf9e694a4e14dda780e96d54c8a33b9599
parent3ce77142a6452d76d6f97c9a6c2da193e78841ba
libcxx 'LLVM_USE_SANITIZER=Address;Undefined'

Summary:
Allow users to simultaneously enable address and undefined behavior
sanitizers, in the same manner that LLVM's 'HandleLLVMOptions.cmake'
allows.

Prior to this patch, `cmake -DLLVM_USE_SANITIZER="Address;Undefined"`
would succeed and the build would build most of the LLVM project with
`-fsanitize=address,undefined`, but a warning would be printed by
libcxx's CMake, and the build would use neither sanitizer. This
patch results in no warning being printed, and both sanitizers are used
in building libcxx.

Reviewers: jroelofs, EricWF, ldionne, #libc!

Subscribers: mgorny, dexonsmith, llvm-commits, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D77466
libcxx/CMakeLists.txt