[clang] [flang] [flang][Driver] Enable -pie and -no-pie in flang's driver (PR #164890)
Tarun Prabhu via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 27 08:24:31 PDT 2025
================
@@ -10,6 +10,16 @@
! Make sure that `-L' is "visible" to Flang's driver
! RUN: %flang -L/ -### %s
+! Check that '-pie' is "visible" to Flang's driver and is passed on to the
+! linker.
+! RUN: %flang -pie -### %s 2>&1 | FileCheck %s --check-prefix=PIE
+! PIE: "-pie"
+
+! Check that '-no-pie' is "visible" to Flang's driver and that "-pie" is *not*
+! passed to the linker.
+! RUN: %flang -no-pie -### %s 2>&1 | FileCheck %s --check-prefix=NO-PIE
+! NO-PIE-NOT: "-pie"
+
----------------
tarunprabhu wrote:
The default is `-pie`. There is an explicit test for this now. Tests have also been added for the combination.
https://github.com/llvm/llvm-project/pull/164890
More information about the cfe-commits
mailing list