73 lines · yaml
1# RUN: yaml2obj %s -o %t1.o2 3# RUN: wasm-ld --no-entry --features=foo,bar,baz -o %t.specified.wasm %t1.o4# RUN: obj2yaml %t.specified.wasm | FileCheck %s --check-prefix SPECIFIED5 6# RUN: wasm-ld --no-entry --features=bar,baz,quux -o %t.unspecified.wasm %t1.o7# RUN: obj2yaml %t.unspecified.wasm | FileCheck %s --check-prefix UNSPECIFIED8 9# RUN: yaml2obj %S/Inputs/disallow-feature-foo.yaml -o %t.disallowed.o10# RUN: wasm-ld --no-entry -o - %t1.o %t.disallowed.o | obj2yaml | FileCheck %s --check-prefix DISALLOWED11 12# RUN: yaml2obj %S/Inputs/no-feature-foo.yaml -o %t.none.o13# RUN: wasm-ld --no-entry -o - %t1.o %t.none.o | obj2yaml | FileCheck %s --check-prefix NONE14 15# Check that the following combinations of feature linkage policies16# give the expected results:17#18# DISALLOWED x DISALLOWED => NONE19# DISALLOWED x NONE => NONE20 21--- !WASM22FileHeader:23 Version: 0x0000000124Sections:25 - Type: CUSTOM26 Name: linking27 Version: 228 - Type: CUSTOM29 Name: target_features30 Features:31 - Prefix: DISALLOWED32 Name: "foo"33 # included so output has target features section34 - Prefix: USED35 Name: "bar"36...37 38# SPECIFIED: - Type: CUSTOM39# SPECIFIED: Name: target_features40# SPECIFIED-NEXT: Features:41# SPECIFIED-NEXT: - Prefix: USED42# SPECIFIED-NEXT: Name: bar43# SPECIFIED-NEXT: - Prefix: USED44# SPECIFIED-NEXT: Name: baz45# SPECIFIED-NEXT: - Prefix: USED46# SPECIFIED-NEXT: Name: foo47# SPECIFIED-NEXT: ...48 49# UNSPECIFIED: - Type: CUSTOM50# UNSPECIFIED: Name: target_features51# UNSPECIFIED-NEXT: Features:52# UNSPECIFIED-NEXT: - Prefix: USED53# UNSPECIFIED-NEXT: Name: bar54# UNSPECIFIED-NEXT: - Prefix: USED55# UNSPECIFIED-NEXT: Name: baz56# UNSPECIFIED-NEXT: - Prefix: USED57# UNSPECIFIED-NEXT: Name: quux58# UNSPECIFIED-NEXT: ...59 60# DISALLOWED: - Type: CUSTOM61# DISALLOWED: Name: target_features62# DISALLOWED-NEXT: Features:63# DISALLOWED-NEXT: - Prefix: USED64# DISALLOWED-NEXT: Name: bar65# DISALLOWED-NEXT: ...66 67# NONE: - Type: CUSTOM68# NONE: Name: target_features69# NONE-NEXT: Features:70# NONE-NEXT: - Prefix: USED71# NONE-NEXT: Name: bar72# NONE-NEXT: ...73