brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · b843365 Raw
41 lines · plain
1; REQUIRES: system-darwin2; REQUIRES: target-aarch64 3 4; RUN: rm -rf %t5; RUN: split-file %s %t6 7// Build a simple dylib with debug info.8; RUN: %clang --target=arm64-apple-macos11 -g -dynamiclib %t/foo.c \9; RUN: -current_version 1 -compatibility_version 1 -L%t/usr/lib \10; RUN: -save-temps -dynamiclib \11; RUN: -o %t/foo.dylib -install_name %t/foo.dylib12; RUN: dsymutil %t/foo.dylib -o %t/foo.dSYM13 14; RUN: not clang-installapi -x c++ --target=arm64-apple-macos11 \15; RUN: -install_name %t/foo.dylib  \16; RUN: -current_version 1 -compatibility_version 1 \17; RUN: -o %t/output.tbd -dynamiclib \18; RUN: --verify-against=%t/foo.dylib --dsym=%t/foo.dSYM \19; RUN: --verify-mode=Pedantic 2>&1 | FileCheck %s20 21; CHECK: violations found for arm64 22; CHECK-DAG: foo.c:5:0: error: no declaration found for exported symbol 'bar' in dynamic library23; CHECK-DAG: foo.c:1:0: error: no declaration found for exported symbol 'foo' in dynamic library24 25;--- foo.c26int foo(void) {27  return 1;28}29extern char bar;30char bar = 'a';31 32;--- usr/lib/libSystem.tbd33--- !tapi-tbd34tbd-version:     435targets:         [ arm64-macos ]36install-name:    '/usr/lib/libSystem.B.dylib'37exports: 38  - targets: [ arm64-macos ]39    symbols: [ dyld_stub_binder ]40...41