[PATCH] D60274: [ELF] Implement Dependent Libraries Feature
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 11:31:25 PDT 2019
jyknight added a comment.
This commit message is rather bare-bones -- I hope that the ultimate commit message will be updated to contain more than just a reference to the RFC thread.
================
Comment at: lld/ELF/InputFiles.cpp:402
+ if (Config->DepLibs)
+ if (fs::exists(Specifier))
+ Driver->addFile(Specifier, /*WithLOption=*/false);
----------------
This bit seems unfortunate. "-lfoo" won't search for a file named "foo", and having this code do so does not seem like a good idea. I'd want this feature to work just like -l.
Actually, I think it'd be better to preserve the "-l" prefix in the deplibs section. (I'd note that even if libs in the search path are spelled "-lfoo", that doesn't mean we need accept any other options)
If we want to support loading a filename which not on the search path (but...do we, even? That seems like a kinda scary feature to me...), then it'd be obvious how to spell that: "libfoo.a" and "/baz/bar/foo.a" would open files directly, vs "-lfoo" and "-l:foo.a" would search for them on the search path.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60274/new/
https://reviews.llvm.org/D60274
More information about the llvm-commits
mailing list