[PATCH] D159167: [clang-repl][Orc] Export executable symbols in ClangReplInterpreterExceptionTests
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 27 09:51:53 PDT 2023
vitalybuka added a comment.
In D159167#4651325 <https://reviews.llvm.org/D159167#4651325>, @lhames wrote:
> @vitalybuka If we want to disable this test for now, what's the canonical way to do it? Should we just wrap the whole `add_clang_unittest` block in the conditional?
>
> # export_executable_symbols triggers Lsan report.
> if (NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
>
> add_clang_unittest(ClangReplInterpreterExceptionTests
> InterpreterExceptionTest.cpp
> )
>
> llvm_update_compile_flags(ClangReplInterpreterExceptionTests)
> target_link_libraries(ClangReplInterpreterExceptionTests PUBLIC
> clangAST
> clangBasic
> clangInterpreter
> clangFrontend
> )
> add_dependencies(ClangReplInterpreterExceptionTests clang-resource-headers)
>
> export_executable_symbols(ClangReplInterpreterExceptionTests)
> endif()
This should work.
Also you can
#if LLVM_HWADDRESS_SANITIZER_BUILD || LLVM_ADDRESS_SANITIZER_BUILD
# define MAYBE_MyTest DISABLED_MyTest
#else
# define MAYBE_MyTest MyTest
#endif
But here we have just one test case
Also you can try disable only lsan, link time:
#if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_HWADDRESS_SANITIZER_BUILD
#include <sanitizer/lsan_interface.h>
LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
#endif
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159167/new/
https://reviews.llvm.org/D159167
More information about the cfe-commits
mailing list