[all-commits] [llvm/llvm-project] 876df7: [flang][driver] Allow main program to be in an arc...
Shao-Ce SUN via All-commits
all-commits at lists.llvm.org
Thu Apr 27 18:53:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 876df74dd47196a9ca3b4fff21ffb5441491a0a0
https://github.com/llvm/llvm-project/commit/876df74dd47196a9ca3b4fff21ffb5441491a0a0
Author: Shao-Ce SUN <sunshaoce at iscas.ac.cn>
Date: 2023-04-28 (Fri, 28 Apr 2023)
Changed paths:
M clang/lib/Driver/ToolChains/Gnu.cpp
M flang/docs/FlangDriver.md
M flang/test/CMakeLists.txt
A flang/test/Driver/link-c-main.c
A flang/test/Driver/link-f90-main.f90
M flang/test/Driver/linker-flags.f90
Log Message:
-----------
[flang][driver] Allow main program to be in an archive
Add --undefined=_QQmain to the link line, so that a Fortran main program
will be included in the link job even if it is in an archive (unless we
are building a shared object). For now, this is only applied to the Gnu
toolchain.
We also add a section on the linker invocation to docs/FlangDriver.md.
The new tests require llvm-ar to construct an archive we can include in
the link job. This is a new dependency for flang/test (which already
depends on similar tools such as llvm-objdump).
See discussions in
https://github.com/llvm/llvm-project/issues/54787
which this patch fixes.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D134821
More information about the All-commits
mailing list