Skip to content

Commit

Permalink
[flang] Handle -S assemble only flag in flang-to-external-fc (#78979)
Browse files Browse the repository at this point in the history
Flang was recently updated on Compiler Explorer and by default it's in
assemble only mode, you have to enable linking and executing.

This means that the default output for flang-to-external-fc is nothing,
as it doesn't know what `-S` means. You'd have to know to enable the
link to binary option to see any output.

Handle `-S` so that users of Compiler Explorer don't have to wonder why
the "compiler" is broken.
  • Loading branch information
DavidSpickett committed Jan 22, 2024
1 parent 160ddf7 commit e302950
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flang/tools/f18/flang-to-external-fc.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ parse_args()
COMPILE_ONLY="True"
fi

if [[ $1 == "-S" ]]; then
COMPILE_ONLY="True"
fi

if [[ $1 == "-E" ]]; then
PREPROCESS_ONLY="True"
fi
Expand Down

0 comments on commit e302950

Please sign in to comment.