This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Add FIXME's where we can't use effective triples (NFC)
AbandonedPublic

Authored by vsk on Jul 28 2016, 3:11 PM.

Details

Summary

... even though we *should* be able to.

If we used effective triples at the marked sites, we would fail:

  • test/Driver/{darwin-dsymutil.c, darwin-debug-version.c}

    -ccc-print-bindings is expected to print 'x86_64-apple-darwin10', but prints 'x86_64-apple-macosx10.6.0' instead.
  • test/Driver/netbsd.c

    We see -mcpu=arm1022e instead of arm926ej-s in a single run.
  • test/Driver/linux-as.c

    An extra '-mfpu=neon' argument appears in a single run. Probably harmless -- the test could be relaxed.

This is part of on ongoing effort to use effective target triples
whenever we can in the clang driver (see: [cfe-dev] Lessening the
driver's reliance on default target triples).

Diff Detail

Event Timeline

vsk updated this revision to Diff 66033.Jul 28 2016, 3:11 PM
vsk retitled this revision from to [Driver] Add FIXME's where we can't use effective triples (NFC).
vsk updated this object.
vsk added reviewers: echristo, dexonsmith.
vsk added subscribers: joerg, rengolin, cfe-commits.
echristo edited edge metadata.Aug 3 2016, 11:15 PM

Seems reasonable to fix the tests?

dexonsmith requested changes to this revision.Oct 19 2020, 2:52 PM

I'm not sure if you're still interested in pursuing this, but...

Seems reasonable to fix the tests?

If there are cases where this breaks (correct) tests, I think adding a FIXME is fine, but maybe it can explain in what circumstances getEffectiveTriple is currently incorrect.

lib/Driver/Driver.cpp
2274–2275

Is the test correct?

lib/Driver/Tools.cpp
8731

This refactoring looks like a nice NFC cleanup you can do regardless.

This revision now requires changes to proceed.Oct 19 2020, 2:52 PM
vsk abandoned this revision.Oct 19 2020, 3:04 PM

This isn't on my radar at the moment.