[PATCH] D59333: ELF: Rename Configuration::Static to Bstatic. NFCI.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 14:53:31 PDT 2019
pcc created this revision.
pcc added reviewers: ruiu, grimar.
Herald added subscribers: MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
The name of this field is a little misleading, partly because it does not
match the name of its command line flag. Rename it to match.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59333
Files:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/DriverUtils.cpp
Index: lld/ELF/DriverUtils.cpp
===================================================================
--- lld/ELF/DriverUtils.cpp
+++ lld/ELF/DriverUtils.cpp
@@ -224,7 +224,7 @@
return findFromSearchPaths(Name.substr(1));
for (StringRef Dir : Config->SearchPaths) {
- if (!Config->Static)
+ if (!Config->Bstatic)
if (Optional<std::string> S = findFile(Dir, "lib" + Name + ".so"))
return S;
if (Optional<std::string> S = findFile(Dir, "lib" + Name + ".a"))
Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -223,7 +223,7 @@
return;
}
case file_magic::elf_shared_object:
- if (Config->Static || Config->Relocatable) {
+ if (Config->Bstatic || Config->Relocatable) {
error("attempted static link of dynamic object " + Path);
return;
}
@@ -1095,10 +1095,10 @@
Config->AsNeeded = false;
break;
case OPT_Bstatic:
- Config->Static = true;
+ Config->Bstatic = true;
break;
case OPT_Bdynamic:
- Config->Static = false;
+ Config->Bstatic = false;
break;
case OPT_whole_archive:
InWholeArchive = true;
@@ -1139,14 +1139,14 @@
++InputFile::NextGroupId;
break;
case OPT_push_state:
- Stack.emplace_back(Config->AsNeeded, Config->Static, InWholeArchive);
+ Stack.emplace_back(Config->AsNeeded, Config->Bstatic, InWholeArchive);
break;
case OPT_pop_state:
if (Stack.empty()) {
error("unbalanced --push-state/--pop-state");
break;
}
- std::tie(Config->AsNeeded, Config->Static, InWholeArchive) = Stack.back();
+ std::tie(Config->AsNeeded, Config->Bstatic, InWholeArchive) = Stack.back();
Stack.pop_back();
break;
}
Index: lld/ELF/Config.h
===================================================================
--- lld/ELF/Config.h
+++ lld/ELF/Config.h
@@ -127,6 +127,7 @@
bool ARMHasMovtMovw = false;
bool ARMJ1J2BranchEncoding = false;
bool AsNeeded = false;
+ bool Bstatic = false;
bool Bsymbolic;
bool BsymbolicFunctions;
bool CallGraphProfileSort;
@@ -171,7 +172,6 @@
bool SaveTemps;
bool SingleRoRx;
bool Shared;
- bool Static = false;
bool SysvHash = false;
bool Target1Rel;
bool Trace;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59333.190515.patch
Type: text/x-patch
Size: 2347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190313/402001f8/attachment.bin>
More information about the llvm-commits
mailing list