Skip to content

Commit 66f55a7

Browse files
authored
[Flang] Re-enable -print-resource-dir compiler option (#96799)
This PR re-enables the command line option `-print-resources-dir` after PR #96557 has reverted the changes made. The way this works now, is that it simply prints the current resource dir, which points to clang/$version.
1 parent f425db8 commit 66f55a7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5535,7 +5535,10 @@ def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">,
55355535
Visibility<[ClangOption, CLOption]>;
55365536
def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
55375537
HelpText<"Print the resource directory pathname">,
5538-
Visibility<[ClangOption, CLOption]>;
5538+
HelpTextForVariants<[FlangOption],
5539+
"Print the resource directory pathname that contains lib and "
5540+
"include directories with the runtime libraries and MODULE files.">,
5541+
Visibility<[ClangOption, CLOption, FlangOption]>;
55395542
def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
55405543
HelpText<"Print the paths used for finding libraries and programs">,
55415544
Visibility<[ClangOption, CLOption]>;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
! DEFINE: %{resource_dir} = %S/Inputs/resource_dir
2+
! RUN: %flang -print-resource-dir -resource-dir=%{resource_dir}.. \
3+
! RUN: | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%{resource_dir} %s
4+
! PRINT-RESOURCE-DIR: [[FILE]]

0 commit comments

Comments
 (0)