Skip to content

Commit 9faf4d3

Browse files
committed
Add a test for option from config file.
1 parent d093a6a commit 9faf4d3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Werror

flang/test/Driver/fcc_override.f90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
! RUN: env FCC_OVERRIDE_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %flang -target x86_64-unknown-linux-gnu %s -O2 b -O3 2>&1 | FileCheck %s
22
! RUN: env FCC_OVERRIDE_OPTIONS="x-Werror +-g" %flang -target x86_64-unknown-linux-gnu -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
3+
! RUN: env FCC_OVERRIDE_OPTIONS="x-Werror" %flang --config=%S/Inputs/config-7.cfg -### %s -c 2>&1 | FileCheck %s -check-prefix=CONF
34

45
! CHECK: "-fc1"
56
! CHECK-NOT: "-Oignore"
@@ -10,3 +11,7 @@
1011
! RM-WERROR-NEXT: ### Deleting argument -Werror
1112
! RM-WERROR-NEXT: ### Adding argument -g at end
1213
! RM-WERROR-NOT: "-Werror"
14+
15+
! Test that FCC_OVERRIDE_OPTIONS does not affect the options from config files.
16+
! CONF: ### FCC_OVERRIDE_OPTIONS: x-Werror
17+
! CONF: "-Werror"

0 commit comments

Comments
 (0)