[PATCH] D99795: [gn build] add build file for tsan runtime

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 08:17:38 PDT 2021


thakis created this revision.
thakis added a reviewer: aeubanks.
Herald added subscribers: jfb, mgorny.
thakis requested review of this revision.
Herald added a project: LLVM.

Linux-only for now. Some mac bits stubbed out, but not tested.

Good enough for the tiny_race.c example at
https://clang.llvm.org/docs/ThreadSanitizer.html :

  $ out/gn/bin/clang -fsanitize=address -g -O1 tiny_race.c
  $ while true; do ./a.out || echo $? ; done

While here, also make `-fsanitize=address` work for .c files.


https://reviews.llvm.org/D99795

Files:
  compiler-rt/lib/tsan/CMakeLists.txt
  llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
  llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
  llvm/utils/gn/secondary/compiler-rt/lib/tsan/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99795.334960.patch
Type: text/x-patch
Size: 9439 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210402/5eb45904/attachment.bin>


More information about the llvm-commits mailing list