[flang-commits] [PATCH] D126291: [flang][Driver] Update link job on windows
Markus Mützel via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Jun 13 02:03:40 PDT 2022
mmuetzel added inline comments.
================
Comment at: flang/test/Driver/linker-flags-windows.f90:6
+! NOTE: The additional linker flags tested here are currently specified in
+! clang/lib/Driver/Toolchains/MSVC.cpp.
+! REQUIRES: windows-msvc
----------------
mmuetzel wrote:
> Since this test only applies to MSVC toolchains (not to MinGW), should the file be renamed to, e.g., `linker-flags-msvc.f90`?
>
> Should there be a similar test for MinGW? Which `REQUIRES` would that need?
>
> Could maybe look like this (pending the correct `REQUIRES` line):
> ```
> ! Verify that the Fortran runtime libraries are present in the linker
> ! invocation. These libraries are added on top of other standard runtime
> ! libraries that the Clang driver will include.
>
> ! NOTE: The additional linker flags tested here are currently specified in
> ! clang/lib/Driver/Toolchains/MinGW.cpp.
> ! REQUIRES: windows-mingw
>
> !------------
> ! RUN COMMAND
> !------------
> ! RUN: %flang -### -flang-experimental-exec %S/Inputs/hello.f90 2>&1 | FileCheck %s
>
> !----------------
> ! EXPECTED OUTPUT
> !----------------
> ! Compiler invocation to generate the object file
> ! CHECK-LABEL: {{.*}} "-emit-obj"
> ! CHECK-SAME: "-o" "[[object_file:.*]]" {{.*}}Inputs/hello.f90
>
> ! Linker invocation to generate the executable
> ! CHECK-SAME: "[[object_file]]"
> ! CHECK-SAME: -lFortran_main
> ! CHECK-SAME: -lFortranRuntime
> ! CHECK-SAME: -lFortranDecimal
> ! CHECK-SAME: -lm
> ```
>
I don't know how to edit or retract inline comments.
My previous comments to this file are no longer valid should we follow @mstorsjo's suggestion on running these tests on all platforms.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126291/new/
https://reviews.llvm.org/D126291
More information about the flang-commits
mailing list