[PATCH] D88045: [lld-macho] minimally handle option -dynamic
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 08:05:25 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7afbf3192dc5: [lld-macho] minimally handle option -dynamic (authored by gkm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88045/new/
https://reviews.llvm.org/D88045
Files:
lld/MachO/Config.h
lld/MachO/Driver.cpp
lld/MachO/Options.td
Index: lld/MachO/Options.td
===================================================================
--- lld/MachO/Options.td
+++ lld/MachO/Options.td
@@ -37,7 +37,6 @@
Group<grp_kind>;
def dynamic : Flag<["-"], "dynamic">,
HelpText<"Link dynamically (default)">,
- Flags<[HelpHidden]>,
Group<grp_kind>;
def static : Flag<["-"], "static">,
HelpText<"Link statically">,
Index: lld/MachO/Driver.cpp
===================================================================
--- lld/MachO/Driver.cpp
+++ lld/MachO/Driver.cpp
@@ -525,6 +525,9 @@
config->runtimePaths = args::getStrings(args, OPT_rpath);
config->allLoad = args.hasArg(OPT_all_load);
+ if (const opt::Arg *arg = args.getLastArg(OPT_static, OPT_dynamic))
+ config->staticLink = (arg->getOption().getID() == OPT_static);
+
std::vector<StringRef> &roots = config->systemLibraryRoots;
for (const Arg *arg : args.filtered(OPT_syslibroot))
roots.push_back(arg->getValue());
@@ -603,6 +606,7 @@
case OPT_arch:
case OPT_syslibroot:
case OPT_sectcreate:
+ case OPT_dynamic:
// handled elsewhere
break;
default:
Index: lld/MachO/Config.h
===================================================================
--- lld/MachO/Config.h
+++ lld/MachO/Config.h
@@ -35,6 +35,7 @@
bool hasReexports = false;
bool allLoad = false;
bool forceLoadObjC = false;
+ bool staticLink = false;
uint32_t headerPad;
llvm::StringRef installName;
llvm::StringRef outputFile;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88045.293456.patch
Type: text/x-patch
Size: 1499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200922/7c1c2bd8/attachment-0001.bin>
More information about the llvm-commits
mailing list