[flang-commits] [flang] dc8e46c - [flang][driver] Mark -fuse-ld as visible in Flang

Bryan Chan via flang-commits flang-commits at lists.llvm.org
Wed Aug 23 09:44:00 PDT 2023


Author: Hao Jin
Date: 2023-08-23T12:53:16-04:00
New Revision: dc8e46c7e5ea5f98218c9789164ff410cc14079c

URL: https://github.com/llvm/llvm-project/commit/dc8e46c7e5ea5f98218c9789164ff410cc14079c
DIFF: https://github.com/llvm/llvm-project/commit/dc8e46c7e5ea5f98218c9789164ff410cc14079c.diff

LOG: [flang][driver] Mark -fuse-ld as visible in Flang

The option fuse-ld is not visible in Flang. Flang reports
"Unknown argument: '-fuse-ld'" during link stage.

Reviewed By: awarzynski, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D158430

Added: 
    

Modified: 
    clang/include/clang/Driver/Options.td
    flang/test/Driver/misc-flags.f90

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 619c418365c262..49bf5d6621b46f 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -5887,7 +5887,7 @@ def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">,
   "generated assembly will consider GNU as support. 'none' means that all ELF "
   "features can be used, regardless of binutils support. Defaults to 2.26.">;
 def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>,
-  Flags<[LinkOption]>, Visibility<[ClangOption, CLOption]>;
+  Flags<[LinkOption]>, Visibility<[ClangOption, FlangOption, CLOption]>;
 def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>;
 
 defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>;

diff  --git a/flang/test/Driver/misc-flags.f90 b/flang/test/Driver/misc-flags.f90
index 0c367b90b0b6c7..ab5ed7e93dc8a1 100644
--- a/flang/test/Driver/misc-flags.f90
+++ b/flang/test/Driver/misc-flags.f90
@@ -4,6 +4,9 @@
 ! Make sure that `-Wl` is "visible" to Flang's driver
 ! RUN: %flang -Wl,abs -### %s
 
+! Make sure that `-fuse-ld' is "visible" to Flang's driver
+! RUN: %flang -fuse-ld= -### %s
+
 program hello
   write(*,*), "Hello world!"
 end program hello


        


More information about the flang-commits mailing list