Skip to content
Commit 876df74d authored by Shao-Ce SUN's avatar Shao-Ce SUN
Browse files

[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
parent 443d7152
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment