[all-commits] [llvm/llvm-project] 9c0c12: [CMake][tsan] Remove --sysroot=.

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Dec 30 09:31:16 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c0c123b0b48772973f8864e36e451ab0c8c7419
      https://github.com/llvm/llvm-project/commit/9c0c123b0b48772973f8864e36e451ab0c8c7419
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-12-30 (Wed, 30 Dec 2020)

  Changed paths:
    M compiler-rt/lib/tsan/CMakeLists.txt

  Log Message:
  -----------
  [CMake][tsan] Remove --sysroot=.

rL254966 added `--sysroot=.` to prevent accidental including system headers.
It caused hassle to FreeBSD (D17383)/NetBSD. The next problem is that
we want to include `features.h` (usually `/usr/include/features.h`) to detect `__GLIBC__`.

At this point it seems that `--sysroot=.` adds lots of inconvenience so we disable it for now.
If there is a better way preventing accidental system header inclusion we can consider it again.

Reviewed By: #sanitizers, vitalybuka

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




More information about the All-commits mailing list