This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Give LIBRARY_PATH precedence over native toolchains
AbandonedPublic

Authored by lichray on Oct 29 2017, 11:53 PM.

Details

Reviewers
dlj
Summary

LIBRARY_PATH expansion should happen before expanding native toolchains' linker arguments, if any, to allow overriding the default standard libraries to link. GCC supports this practice as well.

Factor the code expanding LIBRARY_PATH out of AddLinkerInputs into AddLibraryPaths add let the platform-specific code decide the appropriate order for these flags.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=16786

Diff Detail