2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pe | FileCheck -check-prefix=X86 %s
|
|
|
|
X86: -out:a.exe
|
|
|
|
X86-SAME: -machine:x86
|
|
|
|
X86-SAME: -alternatename:__image_base__=___ImageBase
|
|
|
|
X86-SAME: foo.o
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m i386pep | FileCheck -check-prefix=X64 %s
|
|
|
|
X64: -out:a.exe
|
|
|
|
X64-SAME: -machine:x64
|
|
|
|
X64-SAME: -alternatename:__image_base__=__ImageBase
|
|
|
|
X64-SAME: foo.o
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m thumb2pe | FileCheck -check-prefix=ARM %s
|
|
|
|
ARM: -out:a.exe
|
|
|
|
ARM-SAME: -machine:arm
|
|
|
|
ARM-SAME: -alternatename:__image_base__=__ImageBase
|
|
|
|
ARM-SAME: foo.o
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m arm64pe | FileCheck -check-prefix=ARM64 %s
|
|
|
|
ARM64: -out:a.exe
|
|
|
|
ARM64-SAME: -machine:arm64
|
|
|
|
ARM64-SAME: -alternatename:__image_base__=__ImageBase
|
|
|
|
ARM64-SAME: foo.o
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m i386pep -shared | FileCheck -check-prefix=SHARED %s
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep --shared | FileCheck -check-prefix=SHARED %s
|
2017-09-13 00:29:07 +08:00
|
|
|
SHARED: -out:a.dll
|
|
|
|
SHARED-SAME: -dll
|
|
|
|
|
2017-09-15 02:33:09 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -shared foo.def | FileCheck -check-prefix=DEF1 %s
|
|
|
|
DEF1: -def:foo.def
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m i386pep -shared FOO.DEF | FileCheck -check-prefix=DEF2 %s
|
|
|
|
DEF2: -def:FOO.DEF
|
2017-09-13 15:28:13 +08:00
|
|
|
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -obar.exe | FileCheck -check-prefix=OUT %s
|
2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -o bar.exe | FileCheck -check-prefix=OUT %s
|
|
|
|
OUT: -out:bar.exe
|
|
|
|
|
2017-09-15 03:45:22 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep --out-implib bar | FileCheck -check-prefix=IMPLIB %s
|
|
|
|
IMPLIB: -implib:bar
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m i386pep -out-implib bar | FileCheck -check-prefix=NOIMPLIB %s
|
|
|
|
NOIMPLIB: -out:ut-implib
|
|
|
|
|
2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -e bar | FileCheck -check-prefix=ENTRY %s
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -entry bar | FileCheck -check-prefix=ENTRY %s
|
2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep --entry bar | FileCheck -check-prefix=ENTRY %s
|
|
|
|
ENTRY: -entry:bar
|
|
|
|
|
|
|
|
RUN: ld.lld -### foo.o -m i386pep -mllvm bar -mllvm baz | FileCheck -check-prefix=MLLVM %s
|
|
|
|
MLLVM: -mllvm:bar -mllvm:baz
|
|
|
|
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -subsystem console | FileCheck -check-prefix=SUBSYSTEM %s
|
2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep --subsystem console | FileCheck -check-prefix=SUBSYSTEM %s
|
|
|
|
SUBSYSTEM: -subsystem:console
|
|
|
|
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -stack 4194304,8192 | FileCheck -check-prefix=STACK %s
|
2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep --stack 4194304,8192 | FileCheck -check-prefix=STACK %s
|
|
|
|
STACK: -stack:4194304,8192
|
|
|
|
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep -verbose | FileCheck -check-prefix=VERBOSE %s
|
2017-09-13 00:29:07 +08:00
|
|
|
RUN: ld.lld -### foo.o -m i386pep --verbose | FileCheck -check-prefix=VERBOSE %s
|
|
|
|
VERBOSE: -verbose
|
2017-09-13 03:23:54 +08:00
|
|
|
|
|
|
|
RUN: ld.lld -### -shared -m i386pe -e _DllMainCRTStartup@12 foo.o | FileCheck -check-prefix I386-ENTRY %s
|
|
|
|
I386-ENTRY: -entry:DllMainCRTStartup@12
|
2017-09-13 15:28:09 +08:00
|
|
|
|
|
|
|
RUN: ld.lld -### -m i386pep foo.o --whole-archive bar.a --no-whole-archive baz.a | FileCheck -check-prefix WHOLE-ARCHIVE %s
|
2017-09-15 02:33:21 +08:00
|
|
|
RUN: ld.lld -### -m i386pep foo.o -whole-archive bar.a -no-whole-archive baz.a | FileCheck -check-prefix WHOLE-ARCHIVE %s
|
2017-09-13 15:28:09 +08:00
|
|
|
WHOLE-ARCHIVE: foo.o -wholearchive:bar.a baz.a
|
2017-09-14 03:29:39 +08:00
|
|
|
|
|
|
|
RUN: ld.lld -### -m i386pep foo.o | FileCheck -check-prefix MINGW-FLAG %s
|
|
|
|
MINGW-FLAG: -lldmingw
|