@@ -137,15 +137,15 @@ opt::InputArgList ELFOptTable::parse(ArrayRef<const char *> argv) {
137137
138138void elf::printHelp () {
139139 ELFOptTable ().printHelp (
140- lld::outs (), (config-> progName + " [options] file..." ).str ().c_str (),
140+ lld::outs (), (ctx. arg . progName + " [options] file..." ).str ().c_str (),
141141 " lld" , false /* ShowHidden*/ , true /* ShowAllAliases*/ );
142142 lld::outs () << " \n " ;
143143
144144 // Scripts generated by Libtool versions up to 2021-10 expect /: supported
145145 // targets:.* elf/ in a message for the --help option. If it doesn't match,
146146 // the scripts assume that the linker doesn't support very basic features
147147 // such as shared libraries. Therefore, we need to print out at least "elf".
148- lld::outs () << config-> progName << " : supported targets: elf\n " ;
148+ lld::outs () << ctx. arg . progName << " : supported targets: elf\n " ;
149149}
150150
151151static std::string rewritePath (StringRef s) {
@@ -214,7 +214,7 @@ static std::optional<std::string> findFile(StringRef path1,
214214 const Twine &path2) {
215215 SmallString<128 > s;
216216 if (path1.starts_with (" =" ))
217- path::append (s, config-> sysroot , path1.substr (1 ), path2);
217+ path::append (s, ctx. arg . sysroot , path1.substr (1 ), path2);
218218 else
219219 path::append (s, path1, path2);
220220
@@ -224,7 +224,7 @@ static std::optional<std::string> findFile(StringRef path1,
224224}
225225
226226std::optional<std::string> elf::findFromSearchPaths (StringRef path) {
227- for (StringRef dir : config-> searchPaths )
227+ for (StringRef dir : ctx. arg . searchPaths )
228228 if (std::optional<std::string> s = findFile (dir, path))
229229 return s;
230230 return std::nullopt ;
@@ -233,8 +233,8 @@ std::optional<std::string> elf::findFromSearchPaths(StringRef path) {
233233// This is for -l<basename>. We'll look for lib<basename>.so or lib<basename>.a from
234234// search paths.
235235std::optional<std::string> elf::searchLibraryBaseName (StringRef name) {
236- for (StringRef dir : config-> searchPaths ) {
237- if (!config-> isStatic )
236+ for (StringRef dir : ctx. arg . searchPaths ) {
237+ if (!ctx. arg . isStatic )
238238 if (std::optional<std::string> s = findFile (dir, " lib" + name + " .so" ))
239239 return s;
240240 if (std::optional<std::string> s = findFile (dir, " lib" + name + " .a" ))
0 commit comments