[all-commits] [llvm/llvm-project] aa2a5a: [CMake][ASAN] Add support for ADDRESS_SANITIZER_BU...

Christian Ulmann via All-commits all-commits at lists.llvm.org
Wed Sep 11 07:16:55 PDT 2024


  Branch: refs/heads/users/dinistro/asan-compile-option
  Home:   https://github.com/llvm/llvm-project
  Commit: aa2a5abff7b3c7790f4863abae504f3cd426b35b
      https://github.com/llvm/llvm-project/commit/aa2a5abff7b3c7790f4863abae504f3cd426b35b
  Author: Christian Ulmann <christian.ulmann at nextsilicon.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M llvm/cmake/modules/HandleLLVMOptions.cmake
    M llvm/include/llvm/Support/Compiler.h

  Log Message:
  -----------
  [CMake][ASAN] Add support for ADDRESS_SANITIZER_BUILD compile option

This commit introduces the `LLVM_ADDRESS_SANITIZER_BUILD` compile option
that is set to indicate if LLVM has been built with ASAN enabled or not.
This is a necessary addition to properly control the declarations of
`__asan_*` helpers in header files. Previously, some of these
declarations relied on `__has_feature(address_sanitizer)`, which can
lead to differences between in-tree compilation units and down-stream
usages of the same headers.

The reproducer of this issue involved templates, which then lead to
violation of the ODR due to having two different instances of the same
template.


  Commit: 9ac511312d7f458367fc72b6ac9ec304b1574fc8
      https://github.com/llvm/llvm-project/commit/9ac511312d7f458367fc72b6ac9ec304b1574fc8
  Author: Christian Ulmann <christianulmann at gmail.com>
  Date:   2024-09-11 (Wed, 11 Sep 2024)

  Changed paths:
    M llvm/cmake/modules/HandleLLVMOptions.cmake
    M llvm/include/llvm/Config/llvm-config.h.cmake
    M llvm/include/llvm/Support/Compiler.h

  Log Message:
  -----------
  add #error for ASAN mismatch with DYLIB off


Compare: https://github.com/llvm/llvm-project/compare/cf02983f4375...9ac511312d7f

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list