[all-commits] [llvm/llvm-project] ead92a: [libc] Prevent system headers from being included ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Sep 5 06:43:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ead92ae5fe8b6c281506d83acdbde550eeeaeb62
      https://github.com/llvm/llvm-project/commit/ead92ae5fe8b6c281506d83acdbde550eeeaeb62
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-09-05 (Tue, 05 Sep 2023)

  Changed paths:
    M libc/CMakeLists.txt
    M libc/cmake/modules/LLVMLibCObjectRules.cmake

  Log Message:
  -----------
  [libc] Prevent system headers from being included for the GPU build

It's very important that the GPU build does not include any system
directories. We currently use `-ffreestanding` to disable a lot of these
features, but we can still accidentally include them if they are not
provided by `libc` yet. This patch changes this to use `-nostdinc` to
disable all standard search paths. Then we use the compiler's resource
directory to pick up the provided headers like `stdint.h`.

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




More information about the All-commits mailing list