This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver][Revert] Reverts f18 to allow options passed to -W
ClosedPublic

Authored by arnamoy10 on Apr 20 2021, 1:06 PM.

Details

Summary

f18 runs compilation all the way to the linking step. However, with the implementation of the -Werror option in the frontend driver, to makes tests shareable between the driver and f18, the code of the later was modified so that it terminates compilation if anything other than error is given for -W.

So a command like the following would fail:

flang   -Wl,-z,muldefs    -march=skylake-avx512 -mfpmath=sse -Ofast -funroll-loops -flto   exchange2.fppized.o  -L/export/users/build_1.1.1/jemalloc/intel64/lib/ -ljemalloc    -o exchange2_r

This patch takes away the modification ONLY from f18, so that the flang-new driver still retains the power to cause compilation termination if anything other that -Werror is supplied for the -W option (until they are supported).

Diff Detail

Event Timeline

arnamoy10 created this revision.Apr 20 2021, 1:06 PM
arnamoy10 requested review of this revision.Apr 20 2021, 1:06 PM
Herald added a project: Restricted Project. · View Herald Transcript

These changes LGTM - there's no need to limit f18, but we should continue being strict in flang-new and reject everything that's not supported.

Please, could you shorten the title of the commit? As per https://llvm.org/docs/DeveloperPolicy.html#commit-messages

The title should be concise.

I try to limit myself to 50 chars for the title and 72 chars for the body. This is not always possible, but currently your title is >110 chars wide.

Also, from your summary:

This patch takes away the modification ONLY in f18, so that the driver still (...)

Could you clarify which driver you have in mind here? It's clear to me, but I've been working with it quite a lot. I think that it might be unclear to readers unfamiliar with the state of the drivers in Flang.

arnamoy10 updated this revision to Diff 339569.Apr 22 2021, 4:56 AM
arnamoy10 retitled this revision from [flang][driver][revert] Revert f18 code so that options passed to -W does not not cause compilation termination. to [flang][driver][Revert] Reverts f18 to allow options passed to -W.
arnamoy10 edited the summary of this revision. (Show Details)
awarzynski accepted this revision.Apr 22 2021, 5:31 AM
This revision is now accepted and ready to land.Apr 22 2021, 5:31 AM