[PATCH] D93950: [LLD] [MinGW] Pass the --demangle and --no-demangle options to the COFF linker
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 00:08:45 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG248e3450fb8a: [LLD] [MinGW] Pass the --demangle and --no-demangle options to the COFF linker (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93950/new/
https://reviews.llvm.org/D93950
Files:
lld/MinGW/Driver.cpp
lld/MinGW/Options.td
lld/test/MinGW/driver.test
Index: lld/test/MinGW/driver.test
===================================================================
--- lld/test/MinGW/driver.test
+++ lld/test/MinGW/driver.test
@@ -285,3 +285,12 @@
RUN: ld.lld -### -m i386pep foo.o -wrap foo1 --wrap foo2 | FileCheck -check-prefix WRAP %s
RUN: ld.lld -### -m i386pep foo.o -wrap=foo1 --wrap=foo2 | FileCheck -check-prefix WRAP %s
WRAP: -wrap:foo1 -wrap:foo2
+
+RUN: ld.lld -### -m i386pep foo.o | FileCheck -check-prefix DEMANGLE %s
+RUN: ld.lld -### -m i386pep foo.o -demangle | FileCheck -check-prefix DEMANGLE %s
+RUN: ld.lld -### -m i386pep foo.o --demangle | FileCheck -check-prefix DEMANGLE %s
+DEMANGLE: -demangle{{ }}
+
+RUN: ld.lld -### -m i386pep foo.o -no-demangle | FileCheck -check-prefix NO-DEMANGLE %s
+RUN: ld.lld -### -m i386pep foo.o --no-demangle | FileCheck -check-prefix NO-DEMANGLE %s
+NO-DEMANGLE: -demangle:no
Index: lld/MinGW/Options.td
===================================================================
--- lld/MinGW/Options.td
+++ lld/MinGW/Options.td
@@ -28,6 +28,9 @@
"Do not allow multiple definitions (default)">;
def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">;
def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
+defm demangle: B<"demangle",
+ "Demangle symbol names (default)",
+ "Do not demangle symbol names">;
def disable_auto_import: F<"disable-auto-import">,
HelpText<"Don't automatically import data symbols from other DLLs without dllimport">;
def disable_runtime_pseudo_reloc: F<"disable-runtime-pseudo-reloc">,
Index: lld/MinGW/Driver.cpp
===================================================================
--- lld/MinGW/Driver.cpp
+++ lld/MinGW/Driver.cpp
@@ -320,6 +320,11 @@
else
add("-opt:noref");
+ if (args.hasFlag(OPT_demangle, OPT_no_demangle, true))
+ add("-demangle");
+ else
+ add("-demangle:no");
+
if (args.hasFlag(OPT_enable_auto_import, OPT_disable_auto_import, true))
add("-auto-import");
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93950.315057.patch
Type: text/x-patch
Size: 1992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210107/bd7bfd58/attachment.bin>
More information about the llvm-commits
mailing list