HomePhabricator

Ensure that CompilerInvocationTest normalizes default target triples

Authored by dang on Jun 25 2020, 2:36 AM.

Details

Committed
dangJun 25 2020, 2:41 AM
Parents
rG5a7cd5db3cba: [MLIR][Shape] Fix ambiguous symbol
Branches
Unknown
Tags
Unknown

Event Timeline

I think this revert was wrong.

The arm builtbot failure was a result of the original patch, not 6330653547f492646c92553738dab6a99d7d9710

dang added a comment.EditedJun 25 2020, 4:11 PM

Yes, the very original failure was a bug in the original patch. This was a partial solution and is the right thing to do regardless. The rest of the solution is in rGf79a66ba6962

Yes, the very original failure was a bug in the original patch. This was a partial solution and is the right thing to do regardless. The rest of the solution is in rGf79a66ba6962

I have seen f79a66ba69628db471d559f0f182f476bf49ac90, but isn't the state after 6330653547f492646c92553738dab6a99d7d9710 was correct as well?

Neither place is normalized. I think that is the default clang -### behavior when it constructs -triple in the CC1 command line.

dang added a comment.Jun 26 2020, 6:01 AM

Neither place being normalized should make the test pass but it isn't consistent with the state before rG29125ddf1323 where TargetOpts->Triple is unconditionally normalized regardless of whether -triple was specified or if it was derived from getDefaultTargetTriple. The aim of rG29125ddf1323 was to replicate the existing behavior just to move the information inside the tablegen file to make it easy to automatically generate code that can produce a cc1 command line from a CompilerInvocation.