This is an archive of the discontinued LLVM Phabricator instance.

Add -S option
Needs ReviewPublic

Authored by coti on Oct 30 2020, 4:57 PM.

Details

Summary

Everything is in the title. -S (do not assemble) is not supported by the frontend yet.

When -S is passed:

  • do not call the link command ad the end (driver.compileOnly = true)
  • the generated file (relo) ends with .s and not with .o
  • do not remove it

I have also added it in the help displayed by -h.

I don't really know what to test in the associated unit test, since the generated assembly code depends on the backed compiler we are using...

Diff Detail

Event Timeline

coti requested review of this revision.Oct 30 2020, 4:57 PM
coti created this revision.

The idea seems solid to me, but I am also unsure how best to test this. Also, did you clang-format the code before uploading the patch?

coti added a comment.Nov 4 2020, 4:03 PM

yes, I clang-format-ed the code, and I think this is what explains the modification line 620 for example.

This patch touches the old driver, f18, which has been deleted a while back: https://reviews.llvm.org/D105811. I suggest closing this PR.

If you require this functionality, it's currently under active development in fir-dev.

-Andrzej