[all-commits] [llvm/llvm-project] cac82e: [Driver] Make ELF -nopie specific to OpenBSD (#72578)

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Nov 20 23:15:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cac82e26c642d55672b1de6f3d026826c89994ec
      https://github.com/llvm/llvm-project/commit/cac82e26c642d55672b1de6f3d026826c89994ec
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/OpenBSD.cpp
    M clang/lib/Driver/ToolChains/Solaris.cpp
    M clang/test/Driver/android-pie.c
    M clang/test/Driver/pic.c

  Log Message:
  -----------
  [Driver] Make ELF -nopie specific to OpenBSD (#72578)

-no-pie[1]/-nopie is rarely used and among the rare uses almost
everwhere uses -no-pie, since GCC does not recognize -nopie.
However, OpenBSD seems to use -nopie. Therefore, make -nopie specific
to OpenBSD to prevent newer ToolChains (Solaris, SerenityOS) from cargo
culting and copying -nopie.

[1]: https://reviews.llvm.org/D35462




More information about the All-commits mailing list