[flang][Driver] Guard check for pic/pie settings without driver flags (#143530)
The default relocation model for clang depends on the cmake flag CLANG_DEFAULT_PIE_ON_LINUX. By default it is set to ON, but when it's OFF, the default relocation model will be "static". The outcome of the test running clang without any PIC/PIE flags will depend on the cmake flag, so make sure it only runs when the flag is ON.
This commit is contained in:
parent
141d390dcb
commit
e64f8e043c
@ -1,6 +1,6 @@
|
||||
! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-STATIC,CHECK-STATIC-IR %}
|
||||
|
||||
! RUN: %if aarch64-registered-target %{ %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: %if aarch64-registered-target && clang_default_pie_on_linux %{ %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: %if aarch64-registered-target %{ %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 %}
|
||||
! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fPIE 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIE-LEVEL2,CHECK-PIE-LEVEL2-IR %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user