diff options
| author | Reid Kleckner <rnk@google.com> | 2018-06-14 19:56:03 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-06-14 19:56:03 +0000 |
| commit | 34085683921fdfc482ca2bcbd9fcdc026f125083 (patch) | |
| tree | 8ebe5afacadbb8ef35232628d6319f09caa31059 /lld/COFF/Driver.cpp | |
| parent | aa283d80fe7aaa9460e510f20a732f9fbff69ac4 (diff) | |
| download | bcm5719-llvm-34085683921fdfc482ca2bcbd9fcdc026f125083.tar.gz bcm5719-llvm-34085683921fdfc482ca2bcbd9fcdc026f125083.zip | |
[COFF] Fix /wholearchive: to do libpath search again
Fixes https://crbug.com/852882
llvm-svn: 334761
Diffstat (limited to 'lld/COFF/Driver.cpp')
| -rw-r--r-- | lld/COFF/Driver.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 74c84662059..ecfa258bce7 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -1247,8 +1247,9 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { std::set<sys::fs::UniqueID> WholeArchives; for (auto *Arg : Args.filtered(OPT_wholearchive_file)) - if (Optional<sys::fs::UniqueID> ID = getUniqueID(Arg->getValue())) - WholeArchives.insert(*ID); + if (Optional<StringRef> Path = doFindFile(Arg->getValue())) + if (Optional<sys::fs::UniqueID> ID = getUniqueID(*Path)) + WholeArchives.insert(*ID); // A predicate returning true if a given path is an argument for // /wholearchive:, or /wholearchive is enabled globally. @@ -1266,7 +1267,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { // for /defaultlib option. for (auto *Arg : Args.filtered(OPT_INPUT, OPT_wholearchive_file)) if (Optional<StringRef> Path = findFile(Arg->getValue())) - enqueuePath(*Path, IsWholeArchive(Arg->getValue())); + enqueuePath(*Path, IsWholeArchive(*Path)); for (auto *Arg : Args.filtered(OPT_defaultlib)) if (Optional<StringRef> Path = findLib(Arg->getValue())) |

