[all-commits] [llvm/llvm-project] 55978f: [gn build] add build file for tsan runtime

Nico Weber via All-commits all-commits at lists.llvm.org
Fri Apr 2 09:59:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55978f914e88dc12bcc62666128c175c86adfd22
      https://github.com/llvm/llvm-project/commit/55978f914e88dc12bcc62666128c175c86adfd22
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-04-02 (Fri, 02 Apr 2021)

  Changed paths:
    M compiler-rt/lib/tsan/CMakeLists.txt
    M llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
    M llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
    A llvm/utils/gn/secondary/compiler-rt/lib/tsan/BUILD.gn

  Log Message:
  -----------
  [gn build] add build file for tsan runtime

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.

Differential Revision: https://reviews.llvm.org/D99795




More information about the All-commits mailing list