Also sync help texts for the option between elf and coff ports. Decisions: - Do this even if /lldignoreenv is passed. /reproduce: does not affect the main output, and this makes the env var more convenient to use. (On the other hand, it's now possible to set this env var and forget about it, and all future builds in the same shell will be much slower. That's true for ld.lld, but posix shells have an easy way to set an env var for a single command; in cmd.exe this is not possible without contortions. Then again, lld-link runs in posix shells too.) Original patch rebased across D68378 and D68381. Differential Revision: https://reviews.llvm.org/D67707
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
# REQUIRES: x86, shell
|
|
|
|
# RUN: rm -rf %t.dir
|
|
# RUN: mkdir -p %t.dir/build1 %t.dir/build2 %t.dir/build3 %t.dir/build4
|
|
# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
|
|
|
|
# RUN: cd %t.dir/build1
|
|
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
|
|
# RUN: /entry:main@0 /linkrepro:. /out:%t.exe
|
|
# RUN: tar xf repro.tar
|
|
# RUN: diff %t.obj repro/%:t.obj
|
|
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
|
|
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
|
|
|
|
# RUN: cd %t.dir/build1
|
|
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
|
|
# RUN: /entry:main@0 /reproduce:repro2.tar /out:%t.exe
|
|
# RUN: tar xf repro2.tar
|
|
# RUN: diff %t.obj repro2/%:t.obj
|
|
# RUN: diff %p/Inputs/std32.lib repro2/%:p/Inputs/std32.lib
|
|
# RUN: FileCheck %s --check-prefix=RSP < repro2/response.txt
|
|
|
|
# RUN: cd %t.dir/build2
|
|
# RUN: env LLD_REPRODUCE=repro.tar lld-link %t.obj %p/Inputs/std32.lib \
|
|
# RUN: /subsystem:console /entry:main@0 /out:%t.exe
|
|
# RUN: tar xf repro.tar
|
|
# RUN: diff %t.obj repro/%:t.obj
|
|
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
|
|
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
|
|
|
|
# RUN: cd %t.dir/build3
|
|
# RUN: lld-link %t.obj /libpath:%p/Inputs /defaultlib:std32 /subsystem:console \
|
|
# RUN: /entry:main@0 /linkrepro:. /out:%t.exe
|
|
# RUN: tar xf repro.tar
|
|
# RUN: diff %t.obj repro/%:t.obj
|
|
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
|
|
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
|
|
|
|
# RUN: cd %t.dir/build4
|
|
# RUN: env LIB=%p/Inputs lld-link %t.obj /defaultlib:std32 /subsystem:console \
|
|
# RUN: /entry:main@0 /linkrepro:. /out:%t.exe
|
|
# RUN: tar xf repro.tar
|
|
# RUN: diff %t.obj repro/%:t.obj
|
|
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
|
|
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
|
|
|
|
# RSP: /subsystem:console
|
|
# RSP: /entry:main@0
|
|
# RSP-NOT: /linkrepro:
|
|
# RSP: /out:
|
|
# RSP: linkrepro.test.tmp.obj
|
|
# RSP-NOT: defaultlib
|
|
# RSP: std32.lib
|