[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

Valentin Clement via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 7 14:42:10 PDT 2023


clementval added inline comments.
Herald added a subscriber: sunshaoce.


================
Comment at: flang/test/Driver/pic-flags.f90:3
 
-! RUN: %flang -### %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE
-! RUN: %flang -### %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE
+! RUN: %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIE-LEVEL2,CHECK-PIE-LEVEL2-IR
+! RUN: %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fpie 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIE-LEVEL1,CHECK-PIE-LEVEL1-IR
----------------
This test has been failing on my side for very long time. Just curious why we check for PIE-LEVEL-2 when no level is given. Where is the default given?

On my machine I have `-mrelocation-model static` for this run line. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131533



More information about the cfe-commits mailing list