[PATCH] D113372: [Driver] Add CLANG_DEFAULT_PIE to emulate GCC --enable-default-pie

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 12 15:40:45 PST 2021


MaskRay added inline comments.


================
Comment at: clang/CMakeLists.txt:230
 
+option(CLANG_DEFAULT_PIE "Default to -fPIE and -pie (Linux only)" OFF)
+if(CLANG_DEFAULT_PIE)
----------------
joerg wrote:
> This option should really be called something like CLANG_DEFAULT_PIE_ON_LINUX or so. It should be explicit from the name that it only effects that toolchain and not all the various toolchains that support PIE.
This name is fine with me. This ecosystem variety probably only happens for Linux and other operations systems probably can just switch unconditionally (with possibly gated on an os version).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113372/new/

https://reviews.llvm.org/D113372



More information about the cfe-commits mailing list