91bfccf83733e6d12a6da9f2e1a2d20a88fb974c added a shared library for
clang_rt.tsan and uses TSAN_RTL_DYNAMIC_CFLAGS for its CFLAGS. But
TSAN_RTL_DYNAMIC_CFLAGS was adding TSAN_RTL_CFLAGS before it had
actually been set with further arguments (eg. in the
COMPILER_RT_INTERCEPT_LIBDISPATCH block). Set it right before its use
to avoid this problem in the future.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| compiler-rt/lib/tsan/rtl/CMakeLists.txt | ||
|---|---|---|
| 72 | I don't think we should set TSAN_RTL_DYNAMIC_CFLAGS in line 251, because we set(TSAN_RTL_DYNAMIC_CFLAGS ${TSAN_RTL_CFLAGS}) before. If we put these two statements later, the items in TSAN_RTL_DYNAMIC_CFLAGS will be different. | |
| compiler-rt/lib/tsan/rtl/CMakeLists.txt | ||
|---|---|---|
| 72 | Sorry, I'm not quite understanding what you're saying here. TSAN_RTL_DYNAMIC_CFLAGS isn't set anywhere else in this file. The current issue is that it *doesn't* include eg. COMPILER_RT_LIBDISPATCH_CFLAGS because it was being set to TSAN_RTL_CFLAGS before TSAN_RTL_CFLAGS was actually finished having flags added to. Are you saying that was intentional? | |
| compiler-rt/lib/tsan/rtl/CMakeLists.txt | ||
|---|---|---|
| 72 | yes, that's my concern. I was thinking about whether COMPILER_RT_LIBDISPATCH_CFLAGS should be included. Sorry for the misunderstanding. LGTM :D | |
I don't think we should set TSAN_RTL_DYNAMIC_CFLAGS in line 251, because we set(TSAN_RTL_DYNAMIC_CFLAGS ${TSAN_RTL_CFLAGS}) before. If we put these two statements later, the items in TSAN_RTL_DYNAMIC_CFLAGS will be different.