This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Do not lose already detected set of toolchain's multilibs while iterating over different library path suffixes and different library versions.
ClosedPublic

Authored by atanasyan on May 8 2014, 3:32 PM.

Details

Summary

To find the most appropriate library for the given command line flags we iterate over a set of disk paths. Before probe each path the already detected set of multilibs are cleared. If the set of paths contains existing paths which do not satisfy command line flags or do not contain necessary libraries and object files at all we might lose found multilibs.

The patch updates variables which hold detected multilibs if we really find a new multilib matches command line flags.

Diff Detail

Event Timeline

atanasyan updated this revision to Diff 9233.May 8 2014, 3:32 PM
atanasyan retitled this revision from to [Driver] Do not lose already detected set of toolchain's multilibs while iterating over different library path suffixes and different library versions..
atanasyan updated this object.
atanasyan edited the test plan for this revision. (Show Details)
atanasyan added a subscriber: Unknown Object (MLST).
jroelofs edited edge metadata.May 8 2014, 4:20 PM

Thanks Simon, this is a much clearer fix.

jroelofs added inline comments.May 8 2014, 4:22 PM
lib/Driver/ToolChains.cpp
1906

Don't we need a

Result.Multilibs.clear();

here, that way Multilibs from different candidate sets don't get used together?

Or maybe I don't fully understand the problem that this (or the other patch) solves...

atanasyan updated this revision to Diff 9237.May 9 2014, 12:24 AM
atanasyan updated this object.
atanasyan edited edge metadata.

Modify the findMIPSMultilibs() function so it really modifies result set of multilibs only in case of successful searching.

jroelofs accepted this revision.May 9 2014, 2:08 PM
jroelofs edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 9 2014, 2:08 PM
atanasyan closed this revision.May 12 2014, 12:46 AM

Thanks for review.

Closed by commit rL208523 (authored by @atanasyan)

a.sidorin edited edge metadata.May 12 2014, 1:55 AM

Patch solves a problem for me.