Skip to content

Commit b31e990

Browse files
committed
Apply suggested edit by @kkwli
1 parent c9a9bb1 commit b31e990

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

flang/docs/FlangDriver.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,12 @@ and use the `-fno-fortran-main` flag. This flag removes
213213
translation units to provide a definition of the `main` function. In this case,
214214
it may be required to explicitly supply C++ runtime libraries as mentioned above.
215215

216-
When creating shared or static libraries, `Fortran_main` is automatically
217-
removed from the linker stage. It is assumed that when creating a static or
218-
shared library, the generated library does not need a `main` function, as a
219-
final link stage will occur that will provide the `Fortran_main` library when
220-
creating the final executable.
216+
When creating shared or static libraries using Flang with -shared or -static
217+
flag, Fortran_main is automatically removed from the linker stage (i.e.,
218+
`-fno-fortran-main` is on by default). It is assumed that when creating a
219+
static or shared library, the generated library does not need a `main`
220+
function, as a final link stage will occur that will provide the `Fortran_main`
221+
library when creating the final executable.
221222

222223
## Frontend Driver
223224
Flang's frontend driver is the main interface between compiler developers and

0 commit comments

Comments
 (0)