This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Fix target architecture matching
ClosedPublic

Authored by fjricci on Jul 18 2016, 1:36 PM.

Details

Summary

Use stricter comparisons for architecture. This prevents cmake from failing
for sysroots which can only compile armhf and not arm, since
arm MATCHES armhf is true, while arm STREQUAL armhf is false.

Diff Detail

Repository
rL LLVM

Event Timeline

fjricci updated this revision to Diff 64375.Jul 18 2016, 1:36 PM
fjricci retitled this revision from to [compiler-rt] Fix target architecture matching.
fjricci updated this object.
fjricci added reviewers: beanz, compnerd.
fjricci added a subscriber: llvm-commits.
compnerd edited edge metadata.Jul 18 2016, 2:13 PM

Doesn't this break down where previously this would support matching arm with armv7?

Yes. So in that case, it will still fail to find and build for the armv7 arch, as before, the cmake run will just not fail. Given that this check is for when the architecture is explicitly specified by the user, if one wanted to ensure matching with arm, they could provide arm instead of armv7 on the cmake command line.

compnerd accepted this revision.Jul 19 2016, 3:48 PM
compnerd edited edge metadata.
This revision is now accepted and ready to land.Jul 19 2016, 3:48 PM
This revision was automatically updated to reflect the committed changes.