1# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj 2 3# RUN: lld-link -out:%t.dll -dll %t.obj 2>&1 \ 4# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 5# RUN: touch -t 198002011200.00 %t.lib 6# RUN: lld-link -out:%t.dll -dll %t.obj 7# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 8 9# RUN: lld-link -out:%t.dll -dll -incremental %t.obj 2>&1 \ 10# RUN: | FileCheck -allow-empty -check-prefix=WARN-REF %s 11# RUN: touch -t 198002011200.00 %t.lib 12# RUN: lld-link -out:%t.dll -dll -incremental %t.obj 13# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 14 15# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,noicf %t.obj 2>&1 \ 16# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 17# RUN: touch -t 198002011200.00 %t.lib 18# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,noicf %t.obj 19# RUN: ls -l %t.lib | FileCheck -check-prefix=KEEP %s 20 21# RUN: lld-link -out:%t.dll -dll -debug %t.obj 2>&1 \ 22# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 23# RUN: touch -t 198002011200.00 %t.lib 24# RUN: lld-link -out:%t.dll -dll -debug %t.obj 25# RUN: ls -l %t.lib | FileCheck -check-prefix=KEEP %s 26 27# RUN: lld-link -out:%t.dll -dll -debug -incremental:no %t.obj 2>&1 \ 28# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 29# RUN: touch -t 198002011200.00 %t.lib 30# RUN: lld-link -out:%t.dll -dll -debug -incremental:no %t.obj 31# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 32 33# RUN: lld-link -out:%t.dll -dll -opt:icf %t.obj 2>&1 \ 34# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 35# RUN: touch -t 198002011200.00 %t.lib 36# RUN: lld-link -out:%t.dll -dll -opt:icf %t.obj 37# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 38 39# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,icf %t.obj 2>&1 \ 40# RUN: | FileCheck -check-prefix=WARN-ICF %s 41# RUN: touch -t 198002011200.00 %t.lib 42# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,icf %t.obj 43# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 44 45# RUN: lld-link -out:%t.dll -dll -debug -opt:icf %t.obj 2>&1 \ 46# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 47# RUN: touch -t 198002011200.00 %t.lib 48# RUN: lld-link -out:%t.dll -dll -debug -opt:icf %t.obj 49# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 50 51# RUN: lld-link -out:%t.dll -dll -opt:ref %t.obj 2>&1 \ 52# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 53# RUN: touch -t 198002011200.00 %t.lib 54# RUN: lld-link -out:%t.dll -dll -opt:ref %t.obj 55# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 56 57# RUN: lld-link -out:%t.dll -dll -incremental -opt:ref %t.obj 2>&1 \ 58# RUN: | FileCheck -check-prefix=WARN-REF %s 59# RUN: touch -t 198002011200.00 %t.lib 60# RUN: lld-link -out:%t.dll -dll -incremental -opt:ref %t.obj 61# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 62 63# RUN: touch %t.order 64# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,noicf %t.obj \ 65# RUN: -order:@%t.order 2>&1 | FileCheck -check-prefix=WARN-ORDER %s 66# RUN: touch -t 198002011200.00 %t.lib 67# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,noicf -order:@%t.order %t.obj 68# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 69 70# RUN: lld-link -out:%t.dll -dll -opt:noref,noicf %t.obj \ 71# RUN: -order:@%t.order 2>&1 | FileCheck -allow-empty -check-prefix=NOWARN %s 72# RUN: touch -t 198002011200.00 %t.lib 73# RUN: lld-link -out:%t.dll -dll -opt:noref,noicf -order:@%t.order %t.obj 74# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 75 76# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,noicf %t.obj \ 77# RUN: -profile 2>&1 | FileCheck -check-prefix=WARN-PROFILE %s 78# RUN: touch -t 198002011200.00 %t.lib 79# RUN: lld-link -out:%t.dll -dll -incremental -opt:noref,noicf -profile %t.obj 80# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 81 82# RUN: lld-link -out:%t.dll -dll -opt:noref,noicf %t.obj \ 83# RUN: -profile 2>&1 | FileCheck -allow-empty -check-prefix=NOWARN %s 84# RUN: touch -t 198002011200.00 %t.lib 85# RUN: lld-link -out:%t.dll -dll -opt:noref,noicf -profile %t.obj 86# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 87 88# RUN: lld-link -out:%t.dll -dll -debug -opt:ref %t.obj 2>&1 \ 89# RUN: | FileCheck -allow-empty -check-prefix=NOWARN %s 90# RUN: touch -t 198002011200.00 %t.lib 91# RUN: lld-link -out:%t.dll -dll -debug -opt:ref %t.obj 92# RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s 93 94# NOWARN-NOT: ignoring '/incremental' 95# WARN-ICF: ignoring '/incremental' because ICF is enabled; use '/opt:noicf' to disable 96# WARN-REF: ignoring '/incremental' because REF is enabled; use '/opt:noref' to disable 97# WARN-ORDER: ignoring '/incremental' due to '/order' specification 98# WARN-PROFILE: ignoring '/incremental' due to '/profile' specification 99# KEEP: {{Feb 1 1980|1980-02-01}} 100# NOKEEP-NOT: {{Feb 1 1980|1980-02-01}} 101