[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 23:00:45 PDT 2024


================
@@ -237,7 +237,10 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   if (!D.SysRoot.empty())
     CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
 
-  if (Args.hasArg(options::OPT_pie))
+  // Default to PIE for non-static main components.
----------------
MaskRay wrote:

While the generic ABI refers to executable and shared object files as "components", "main component" isn't used.

main executable or just executable

https://github.com/llvm/llvm-project/pull/102901


More information about the cfe-commits mailing list