Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad3bb75

Browse files
authored
[Flang][Driver] Enable -print-file-name (#195790)
Enable -print-file-name for the Flang driver as already enabled by Clang. Extracted out of #171515 as requested by #171515 (review)
1 parent 9ca29d7 commit ad3bb75

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

clang/include/clang/Options/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6410,7 +6410,7 @@ def prebind : Flag<["-"], "prebind">;
64106410
def preload : Flag<["-"], "preload">;
64116411
def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">,
64126412
HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">,
6413-
Visibility<[ClangOption, CLOption]>;
6413+
Visibility<[ClangOption, FlangOption, CLOption]>;
64146414
def print_ivar_layout : Flag<["-"], "print-ivar-layout">,
64156415
Visibility<[ClangOption, CC1Option]>,
64166416
HelpText<"Enable Objective-C Ivar layout bitmap print trace">,

flang/test/Driver/Inputs/resource_dir/share/asan_ignorelist.txt

Whitespace-only changes.

flang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-unknown-linux-gnu/libflang_rt.runtime.a

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
! Test that -print-file-name finds the correct file.
2+
3+
! RUN: %flang -print-file-name=share/asan_ignorelist.txt \
4+
! RUN: -resource-dir=%S/Inputs/resource_dir \
5+
! RUN: --target=x86_64-unknown-linux-gnu 2>&1 \
6+
! RUN: | FileCheck --check-prefix=CHECK-RESOURCE-DIR %s
7+
! CHECK-RESOURCE-DIR: resource_dir{{/|\\}}share{{/|\\}}asan_ignorelist.txt
8+
9+
! RUN: %flang -print-file-name=libflang_rt.runtime.a \
10+
! RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
11+
! RUN: --target=x86_64-unknown-linux-gnu 2>&1 \
12+
! RUN: | FileCheck --check-prefix=CHECK-FLANG-RT %s
13+
! CHECK-FLANG-RT: resource_dir_with_per_target_subdir{{/|\\}}lib{{/|\\}}x86_64-unknown-linux-gnu{{/|\\}}libflang_rt.runtime.a

0 commit comments

Comments
 (0)