# 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: 00C0: 0A202020 2020203C 72657175 65737465 |. . |
EMBED: 00E0: 20202020 20203C72 65717565 73746564 | . |
EMBED: 0140: 0A202020 203C2F73 65637572 6974793E |. |
EMBED: 0150: 0A20203C 2F747275 7374496E 666F3E0A |. .|
EMBED: 0160: 20203C64 6570656E 64656E63 793E0A20 | . |
EMBED: 0170: 2020203C 64657065 6E64656E 74417373 | . . |
EMBED: 01B0: 3C2F6465 70656E64 656E7441 7373656D |. . . . |
EMBED: 0200: 20203C61 7373656D 626C7949 64656E74 | . . ..|
EMBED: )