Author: Hao Jin Date: 2023-08-25T13:01:49-04:00 New Revision: 1561495cd128a641b9efcbb9d19d36e5a9c5e952
URL: https://github.com/llvm/llvm-project/commit/1561495cd128a641b9efcbb9d19d36e5a9c5e952 DIFF: https://github.com/llvm/llvm-project/commit/1561495cd128a641b9efcbb9d19d36e5a9c5e952.diff LOG: [flang][driver] Mark -L as visible in Flang Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D158763 Added: Modified: clang/include/clang/Driver/Options.td flang/test/Driver/driver-help-hidden.f90 flang/test/Driver/driver-help.f90 flang/test/Driver/misc-flags.f90 Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 49bf5d6621b46f..da2dc934e37cfd 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -818,6 +818,7 @@ are searched. If the same directory is in the SYSTEM include search paths, for example if also specified with -isystem, the -I option will be ignored}]>; def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>, + Visibility<[ClangOption, FlangOption]>, MetaVarName<"<dir>">, HelpText<"Add directory to library search path">; def MD : Flag<["-"], "MD">, Group<M_Group>, HelpText<"Write a depfile containing user and system headers">; diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 index 80708a7cfafe4b..7f827026b9203d 100644 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -102,6 +102,7 @@ ! CHECK-NEXT: --help-hidden Display help for hidden options ! CHECK-NEXT: -help Display available options ! CHECK-NEXT: -I <dir> Add directory to the end of the list of include search paths +! CHECK-NEXT: -L <dir> Add directory to library search path ! CHECK-NEXT: -march=<value> For a list of available architectures for the target use '-mcpu=help' ! CHECK-NEXT: -mcpu=<value> For a list of available CPUs for the target use '-mcpu=help' ! CHECK-NEXT: -mllvm=<arg> Alias for -mllvm diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 index 7e7d127188093f..b1da592ca0bd8a 100644 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -90,6 +90,7 @@ ! HELP-NEXT: --help-hidden Display help for hidden options ! HELP-NEXT: -help Display available options ! HELP-NEXT: -I <dir> Add directory to the end of the list of include search paths +! HELP-NEXT: -L <dir> Add directory to library search path ! HELP-NEXT: -march=<value> For a list of available architectures for the target use '-mcpu=help' ! HELP-NEXT: -mcpu=<value> For a list of available CPUs for the target use '-mcpu=help' ! HELP-NEXT: -mllvm=<arg> Alias for -mllvm diff --git a/flang/test/Driver/misc-flags.f90 b/flang/test/Driver/misc-flags.f90 index ab5ed7e93dc8a1..61d763c5b64dd2 100644 --- a/flang/test/Driver/misc-flags.f90 +++ b/flang/test/Driver/misc-flags.f90 @@ -7,6 +7,9 @@ ! Make sure that `-fuse-ld' is "visible" to Flang's driver ! RUN: %flang -fuse-ld= -### %s +! Make sure that `-L' is "visible" to Flang's driver +! RUN: %flang -L/ -### %s + program hello write(*,*), "Hello world!" end program hello _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits