[PATCH] D102637: [lld][MinGW] Introduce aliases for -Bdynamic and -Bstatic

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 13:16:08 PDT 2021


mstorsjo added a comment.

In D102637#2764424 <https://reviews.llvm.org/D102637#2764424>, @zero9178 wrote:

> I only first encountered it when compiling Qt 6.1 as well (I haven't checked Qt 6.0, assuming it's there too). The command is actually of the form `-Xlinker -static`. I just quickly ran a grep of it over the output of `ninja -t commands` and as far as I can tell it's added for every executable built by Qt.
> Their build passes it directly to the linker here: https://github.com/qt/qtbase/blob/a4618c020d3923eb6c8c55115c49d7c9f00b3034/cmake/QtTargetHelpers.cmake#L196

Ah, thanks! Ok so apparently that would hit everybody building it statically with the new cmake build system.



================
Comment at: lld/MinGW/Options.td:117
 def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
+def alias_Bdynamic_dy: Flag<["-"],"dy">,Alias<Bdynamic>;
+def alias_Bdynamic_call_shared: Flag<["-"],"call_shared">,Alias<Bdynamic>;
----------------
zero9178 wrote:
> mstorsjo wrote:
> > Nit: I try to keep these alphabetical, especially as long as the existing ones are. And also, keep spaces after commas.
> Ahh that makes sense. I shall commit with:
> ```
> 
> // Alias
> +def alias_Bdynamic_call_shared: Flag<["-"], "call_shared">, Alias<Bdynamic>;
> +def alias_Bdynamic_dy: Flag<["-"], "dy">, Alias<Bdynamic>;
> +def alias_Bstatic_dn: Flag<["-"], "dn">, Alias<Bstatic>;
> +def alias_Bstatic_non_shared: Flag<["-"], "non_shared">, Alias<Bstatic>;
> +def alias_Bstatic_static: Flag<["-"], "static">, Alias<Bstatic>;
>  def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
>  def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;
>  def alias_strip_S: Flag<["-"], "S">, Alias<strip_debug>;
>  def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
> 
> ```
> then.
That looks good, thanks!



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102637/new/

https://reviews.llvm.org/D102637



More information about the llvm-commits mailing list