[all-commits] [llvm/llvm-project] 2288a7: [Driver] Linux.cpp: add -internal-isystem lib/../$...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Mar 21 00:56:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2288a75d9eceeabdffcd72789d97386ee10962fb
      https://github.com/llvm/llvm-project/commit/2288a75d9eceeabdffcd72789d97386ee10962fb
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-03-21 (Sun, 21 Mar 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/Linux.cpp
    M clang/test/Driver/linux-header-search.cpp

  Log Message:
  -----------
  [Driver] Linux.cpp: add -internal-isystem lib/../$triple/include

With this change, for `#include <ar.h>`, `clang --target=aarch64-linux-gnu`
will read `/usr/lib/gcc/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/include/ar.h`
(on Debian gcc->gcc-cross)
instead of `/usr/include/ar.h`. Some glibc headers (e.g. gnu/stubs.h) are different across architectures.




More information about the All-commits mailing list