[libc++] Don't define _LIBCPP_INSTRUMENTED_WITH_ASAN for hwasan builds#178278
Merged
[libc++] Don't define _LIBCPP_INSTRUMENTED_WITH_ASAN for hwasan builds#178278
Conversation
Member
|
@llvm/pr-subscribers-libcxx Author: None (PiJoules) ChangesFull diff: https://github.com/llvm/llvm-project/pull/178278.diff 1 Files Affected:
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index b1a52c95edead..0ac582cb561a8 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -649,7 +649,7 @@ target_compile_options(cxx-sanitizer-flags INTERFACE ${SANITIZER_FLAGS})
# will not be compiled into it, resulting in false positives.
# For context, read: https://github.com/llvm/llvm-project/pull/72677#pullrequestreview-1765402800
string(FIND "${LLVM_USE_SANITIZER}" "Address" building_with_asan)
-if (NOT "${building_with_asan}" STREQUAL "-1")
+if ("${building_with_asan}" STREQUAL "0")
config_define(ON _LIBCPP_INSTRUMENTED_WITH_ASAN)
else()
config_define(OFF _LIBCPP_INSTRUMENTED_WITH_ASAN)
|
Contributor
Author
|
ping |
petrhosek
approved these changes
Jan 28, 2026
honeygoyal
pushed a commit
to honeygoyal/llvm-project
that referenced
this pull request
Jan 30, 2026
llvm#178278) This macro should not be defined if `LLVM_USE_SANITIZER` is `HWAddress`.
sshrestha-aa
pushed a commit
to sshrestha-aa/llvm-project
that referenced
this pull request
Feb 4, 2026
llvm#178278) This macro should not be defined if `LLVM_USE_SANITIZER` is `HWAddress`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This macro can be defined if
LLVM_USE_SANITIZERisHWAddress.