forked from OSchip/llvm-project
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
![]() |
# RUN: yaml2obj %s -o %t1.o
|
||
|
|
||
|
# RUN: yaml2obj %S/Inputs/require-feature-foo.yaml -o %t.required.o
|
||
|
# RUN: wasm-ld --no-entry -o - %t1.o %t.required.o | obj2yaml | FileCheck %s --check-prefix REQUIRED
|
||
|
|
||
|
# RUN: yaml2obj %S/Inputs/disallow-feature-foo.yaml -o %t.disallowed.o
|
||
|
# RUN: not wasm-ld --no-entry -o - %t1.o %t.disallowed.o 2>&1 | FileCheck %s --check-prefix DISALLOWED
|
||
|
|
||
|
# RUN: yaml2obj %S/Inputs/no-feature-foo.yaml -o %t.none.o
|
||
|
# RUN: not wasm-ld --no-entry -o - %t1.o %t.none.o 2>&1 | FileCheck %s --check-prefix NONE
|
||
|
|
||
|
# Check that the following combinations of feature linkage policies
|
||
|
# give the expected results:
|
||
|
#
|
||
|
# REQUIRED x REQUIRED => USED
|
||
|
# REQUIRED x DISALLOWED => Error
|
||
|
# REQUIRED x NONE => Error
|
||
|
|
||
|
--- !WASM
|
||
|
FileHeader:
|
||
|
Version: 0x00000001
|
||
|
Sections:
|
||
|
- Type: CUSTOM
|
||
|
Name: linking
|
||
|
Version: 2
|
||
|
- Type: CUSTOM
|
||
|
Name: target_features
|
||
|
Features:
|
||
|
- Prefix: REQUIRED
|
||
|
Name: "foo"
|
||
|
...
|
||
|
|
||
|
# REQUIRED: - Type: CUSTOM
|
||
|
# REQUIRED-NEXT: Name: target_features
|
||
|
# REQUIRED-NEXT: Features:
|
||
|
# REQUIRED-NEXT: - Prefix: USED
|
||
|
# REQUIRED-NEXT: Name: foo
|
||
|
# REQUIRED-NEXT: ...
|
||
|
|
||
|
# DISALLOWED: Target feature "foo" is disallowed
|
||
|
|
||
|
# NONE: Missing required target feature "foo"
|