[MinGW] Add an --appcontainer flag, passed through to lld-link

GNU ld doesn't have such a flag though, so this is a lld specific
option.

Differential Revision: https://reviews.llvm.org/D60860

llvm-svn: 358759
This commit is contained in:
Martin Storsjo 2019-04-19 13:50:43 +00:00
parent 5505ad34db
commit 2c1f3ea538
3 changed files with 7 additions and 0 deletions

View File

@ -184,6 +184,8 @@ bool mingw::link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) {
Add("-largeaddressaware");
if (Args.hasArg(OPT_kill_at))
Add("-kill-at");
if (Args.hasArg(OPT_appcontainer))
Add("-appcontainer");
if (Args.getLastArgValue(OPT_m) != "thumb2pe" &&
Args.getLastArgValue(OPT_m) != "arm64pe" && !Args.hasArg(OPT_dynamicbase))

View File

@ -55,6 +55,7 @@ def require_defined_eq: J<"require-defined=">, Alias<require_defined>;
// LLD specific options
def _HASH_HASH_HASH : Flag<["-"], "###">,
HelpText<"Print (but do not run) the commands to run for this compilation">;
def appcontainer: F<"appcontainer">, HelpText<"Set the appcontainer flag in the executable">;
def mllvm: S<"mllvm">;
def pdb: S<"pdb">, HelpText<"Specify output PDB debug information file">;
def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,

View File

@ -160,3 +160,7 @@ RUN: ld.lld -### -m i386pep foo.o --insert-timestamp --no-insert-timestamp | Fil
NOTIMESTAMP: -timestamp:0
RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp --insert-timestamp | FileCheck -check-prefix TIMESTAMP %s
TIMESTAMP-NOT: -timestamp:0
RUN: ld.lld -### -m i386pep foo.o -appcontainer | FileCheck -check-prefix APPCONTAINER %s
RUN: ld.lld -### -m i386pep foo.o --appcontainer | FileCheck -check-prefix APPCONTAINER %s
APPCONTAINER: -appcontainer