[compiler-rt] tsan: Refine conditions to intercept pthread_cond_t functions (PR #154268)

Yi Kong via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 01:10:14 PDT 2025


kongy wrote:

This change broke our musl build:

```
FAILED: compiler-rt/lib/tsan/dd/CMakeFiles/RTDD.x86_64.dir/dd_interceptors.cpp.o 
/b/f/w/src/git/out/stage2/./bin/clang++ --target=x86_64-unknown-linux-musl --sysroot=/b/f/w/src/git/prebuilts/build-tools/sysroots/x86_64-unknown-linux-musl -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/f/w/src/git/out/llvm-project/compiler-rt/lib/tsan/dd/../.. -march=x86-64-v2 --target=x86_64-unknown-linux-musl -D_LIBCPP_HAS_MUSL_LIBC -D_LARGEFILE64_SOURCE=1 -include stdc-predef.h  -Wno-unused-command-line-argument -D_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT=1 -mllvm -regalloc-enable-advisor=release  -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -fPIC -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -fno-rtti -std=c++17 -MD -MT compiler-rt/lib/tsan/dd/CMakeFiles/RTDD.x86_64.dir/dd_interceptors.cpp.o -MF compiler-rt/lib/tsan/dd/CMakeFiles/RTDD.x86_64.dir/dd_interceptors.cpp.o.d -o compiler-rt/lib/tsan/dd/CMakeFiles/RTDD.x86_64.dir/dd_interceptors.cpp.o -c /b/f/w/src/git/out/llvm-project/compiler-rt/lib/tsan/dd/dd_interceptors.cpp
b/f/w/src/git/out/llvm-project/compiler-rt/lib/tsan/dd/dd_interceptors.cpp:31639: error: token is not a valid binary operator in a preprocessor subexpression
  316 | #if SANITIZER_GLIBC && !__GLIBC_PREREQ(2, 36) &&                      \
      |                        ~~~~~~~~~~~~~~~^
1 error generated.
```

https://github.com/llvm/llvm-project/pull/154268


More information about the llvm-commits mailing list