[LLD/MinGW]: Expose --thinlto-cache-dir

Differential Revision: https://reviews.llvm.org/D80438
This commit is contained in:
Tobias Hieta 2020-05-24 12:29:16 +03:00 committed by Martin Storsjö
parent 8310c9b741
commit f794808bb9
3 changed files with 7 additions and 0 deletions

View File

@ -249,6 +249,8 @@ bool mingw::link(ArrayRef<const char *> argsArr, bool canExitEarly,
add("-lldmap:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_reproduce))
add("-reproduce:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_thinlto_cache_dir))
add("-lldltocache:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_o))
add("-out:" + StringRef(a->getValue()));

View File

@ -88,6 +88,8 @@ def appcontainer: F<"appcontainer">, HelpText<"Set the appcontainer flag in the
defm delayload: Eq<"delayload", "DLL to load only on demand">;
def mllvm: S<"mllvm">;
defm pdb: Eq<"pdb", "Output PDB debug info file, chosen implicitly if the argument is empty">;
defm thinlto_cache_dir: EqLong<"thinlto-cache-dir",
"Path to ThinLTO cached object file directory">;
def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
HelpText<"Pass <arg> to the COFF linker">;

View File

@ -241,3 +241,6 @@ ENABLE_RUNTIME_PSEUDO_RELOC: -runtime-pseudo-reloc{{ }}
RUN: ld.lld -### -m i386pep foo.o --disable-runtime-pseudo-reloc | FileCheck -check-prefix DISABLE_RUNTIME_PSEUDO_RELOC %s
RUN: ld.lld -### -m i386pep foo.o -disable-runtime-pseudo-reloc | FileCheck -check-prefix DISABLE_RUNTIME_PSEUDO_RELOC %s
DISABLE_RUNTIME_PSEUDO_RELOC: -runtime-pseudo-reloc:no
RUN: ld.lld -### foo.o -m i386pe --thinlto-cache-dir=_foo | FileCheck -check-prefix=THINLTO_CACHEDIR %s
THINLTO_CACHEDIR: -lldltocache:_foo