[PATCH] D140491: [lld-macho] Use ld64's LC_LINKER_OPTIONS behavior by default
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 22 13:10:58 PST 2022
int3 added a comment.
> Alternatively in this patch we could not include --strict-auto-link-options and we could remove --ignore-auto-link-option
Nah I think this current solution is good (:
================
Comment at: lld/MachO/Driver.cpp:1900-1901
+ if (errorCount() != 0 || config->strictAutoLinkOptions) {
+ for (const auto &framework : missingAutolinkFrameworks)
+ warn("auto-linked framework not found for -framework " + framework);
+ for (const auto &library : missingAutolinkLibraries)
----------------
would be nice to include the file where the error originated from, in the format mentioned here: https://reviews.llvm.org/D140225#inline-1357058
================
Comment at: lld/MachO/Options.td:104
Group<grp_lld>;
+def strict_auto_link_options : Flag<["--"], "strict-auto-link-options">,
+ HelpText<"Always warn for framework or library not found errors if they are loaded via LC_LINKER_OPTIONS">,
----------------
how do you feel about just calling this `strict-auto-link`? I don't think there's any other source of auto-linking, so there should be no potential confusion here
(same for the corresponding variable names)
================
Comment at: lld/test/MachO/lc-linker-option.ll:151
+;; Verify that nothing from the framework is included.
+; SYMS_NO_FOO: SYMBOL TABLE:
+; SYMS_NO_FOO-NEXT: g F __TEXT,__text _main
----------------
nit: usually we use hyphens instead of underscores for these (to match the `-NEXT` etc suffixes)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140491/new/
https://reviews.llvm.org/D140491
More information about the llvm-commits
mailing list