Page MenuHomePhabricator

Merge TableGen files used for clang options
ClosedPublic

Authored by dang on Jun 25 2020, 9:09 AM.

Details

Summary

Putting all the options in the same file is needed so they can be
ordered based on the dependencies between them.

Diff Detail

Event Timeline

dang created this revision.Jun 25 2020, 9:09 AM
Bigcheese accepted this revision.Jul 7 2020, 10:38 AM

LGTM. We can look at splitting it up again once we know what the dependencies are.

This revision is now accepted and ready to land.Jul 7 2020, 10:38 AM
This revision was automatically updated to reflect the committed changes.

Hello

Did you mean to remove CC1Options.td too? Otherwise it does not appear to be used any more or this has duplicated the contents.

Also can you make sure the new content of Options.td reflects the latest version of CC1Options.td, and that no extra changes have been made since this was created.

Thanks

dang added a comment.Jul 9 2020, 10:09 PM

Yes I committed this a while ago, I duplicated all the functionality in Options.td.

herhut added a subscriber: herhut.Jul 10 2020, 1:51 AM

Could you add the normalization back? This is in line with the comment to make sure the old and new files align.

clang/include/clang/Driver/Options.td
3455

There is some explicit normalization missing here. In CC1Options.td this is

def triple : Separate<["-"], "triple">,
  HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
  MarshallingInfoString<"TargetOpts->Triple", "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())", "std::string">,
  AlwaysEmit, Normalizer<"normalizeTriple">, DenormalizeString;

It seems the normalizer does not apply to the defaults and we now see a failure in clang/unittests/Frontend/CompilerInvocationTest.cpp for powerpc targets.

dang marked an inline comment as done.Jul 10 2020, 5:31 AM
dang added inline comments.
clang/include/clang/Driver/Options.td
3455

Of course, I must have lost it at some point. Can you link me to the failure for reference.

dang marked 2 inline comments as done.Jul 10 2020, 5:59 AM
dang added inline comments.
clang/include/clang/Driver/Options.td
3455

Done in 0555db0a5df4

I think that 'clang/include/clang/Driver/CC1Options.td' should also be removed ?

dang added a comment.Jul 10 2020, 8:58 AM

I think that 'clang/include/clang/Driver/CC1Options.td' should also be removed ?

Yes must have missed it when rebasing. Done now in 3607aacc5981

vdmitrie added inline comments.
clang/include/clang/Driver/Options.td
3668

This option was deleted.

3738

This option was deleted.

dang added a comment.Jul 10 2020, 9:56 AM

Sorry again, removed the offending options in a2cffb11e287