[flang-commits] [clang] [flang] [flang][Driver] Enable -pie and -no-pie in flang's driver (PR #164890)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Oct 27 04:16:19 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"
+
----------------
kiranchandramohan wrote:

Is there a default? Should we check for the default?
Is the combination `-pie -no-pie` or `-no-pie -pie`  a last one wins case?

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


More information about the flang-commits mailing list