# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
# RUN: rm -f %t.exe.manifest
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: test ! -e %t.exe.manifest
# RUN: lld-link /manifest /out:%t.exe /entry:main %t.obj
# RUN: FileCheck -check-prefix=MANIFEST %s < %t.exe.manifest
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
MANIFEST:
# RUN: lld-link /out:%t.exe /entry:main /manifest \
# RUN: /manifestuac:"level='requireAdministrator' uiAccess='true'" %t.obj
# RUN: FileCheck -check-prefix=UAC %s < %t.exe.manifest
UAC:
UAC:
UAC:
UAC:
UAC:
UAC:
UAC:
UAC:
UAC:
UAC:
# /manifestdependency implies /manifest. (/manifestuac doesn't.)
# RUN: lld-link /out:%t.exe /entry:main \
# RUN: /manifestdependency:"foo='bar'" %t.obj
# RUN: FileCheck -check-prefix=DEPENDENCY %s < %t.exe.manifest
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
DEPENDENCY:
# RUN: lld-link /manifest /out:%t.exe /entry:main /manifestuac:no \
# RUN: /manifestdependency:"foo='bar'" %t.obj
# RUN: FileCheck -check-prefix=NOUAC %s < %t.exe.manifest
NOUAC:
NOUAC:
NOUAC:
NOUAC:
NOUAC:
NOUAC:
NOUAC:
NOUAC:
# RUN: lld-link /manifest /out:%t.exe /entry:main /manifestuac:no %t.obj
# RUN: FileCheck -check-prefix=NOUACNODEP %s < %t.exe.manifest
NOUACNODEP:
NOUACNODEP:
NOUACNODEP:
# Several /manifestdependency: flags are naively dedup'd.
# RUN: lld-link /out:%t.exe /entry:main \
# RUN: /manifestdependency:"foo='bar'" \
# RUN: /manifestdependency:"foo='bar'" \
# RUN: /manifestdependency:"baz='quux'" \
# RUN: %t.obj
# RUN: FileCheck -check-prefix=SEVERALDEPS %s < %t.exe.manifest
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
SEVERALDEPS:
# /manifestdependency: flags can be in .drectve sections.
# RUN: yaml2obj %p/Inputs/manifestdependency-drectve.yaml -o %t.dir.obj
# RUN: rm %t.exe.manifest
# RUN: lld-link /out:%t.exe /entry:main \
# RUN: %t.obj %t.dir.obj
# RUN: FileCheck -check-prefix=SEVERALDEPS %s < %t.exe.manifest
# /manifestdependency: flags in .drectve sections are ignored with an
# explicit /manifest:no.
# RUN: rm %t.exe.manifest
# RUN: lld-link /out:%t.exe /entry:main /manifest:no \
# RUN: %t.obj %t.dir.obj
# RUN: test ! -e %t.exe.manifest
# Test that /manifestdependency: flags in .drectve sections work
# with /manifest:embed too.
# RUN: lld-link /out:%t.exe /entry:main /manifest:embed \
# RUN: %t.obj %t.dir.obj
# RUN: test ! -e %t.exe.manifest
# RUN: llvm-readobj --coff-resources %t.exe \
# RUN: | FileCheck --check-prefix EMBED %s
EMBED: Data (
EMBED: 0000: 3C3F786D 6C207665 7273696F 6E3D2231 |.. . . . . |
EMBED: 0100: 203C2F72 65717565 73746564 50726976 | . . . . . |
EMBED: 0160: 20202020 3C617373 656D626C 79496465 | . . |
EMBED: 01A0: 64657065 6E64656E 63793E0A 20203C64 |dependency>. . <|
EMBED: 01C0: 64657065 6E64656E 74417373 656D626C |dependentAssembl|
EMBED: 01D0: 793E0A20 20202020 203C6173 73656D62 |y>. . . ..|
EMBED: )