Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions test/embedded/dependencies-concurrency-custom-executor.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -disable-availability-checking -parse-as-library -enable-experimental-feature Embedded %s -c -o %t/a.o
// RUN: split-file %s %t
// RUN: %target-swift-frontend -target %target-cpu-apple-macos14 -disable-availability-checking -parse-as-library -enable-experimental-feature Embedded %t/test.swift -c -o %t/a.o
// RUN: %target-clang -x c -std=c11 -I %swift_obj_root/include -c %S/Inputs/executor.c -o %t/executor.o
// RUN: %target-clang %t/a.o %t/executor.o -o %t/a.out %swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos/libswift_Concurrency.a -dead_strip

// RUN: grep DEP\: %s | sed 's#// DEP\: ##' | sort > %t/allowed-dependencies.txt

// RUN: %llvm-nm --undefined-only --format=just-symbols %t/a.out | sort | tee %t/actual-dependencies.txt

// Fail if there is any entry in actual-dependencies.txt that's not in allowed-dependencies.txt
// RUN: test -z "`comm -13 %t/allowed-dependencies.txt %t/actual-dependencies.txt`"
// RUN: sort %t/allowed-dependencies_macos.txt -o %t/allowed-dependencies_macos.txt
// RUN: comm -13 %t/allowed-dependencies_macos.txt %t/actual-dependencies.txt > %t/extra.txt
// RUN: test ! -s %t/extra.txt

//--- allowed-dependencies_macos.txt
___assert_rtn
___stack_chk_fail
___stack_chk_guard
_abort
_clock_gettime
_exit
_free
_malloc
_memmove
_memset
_memset_s
_posix_memalign
_putchar
_puts
_strlen
_strncpy
_vprintf
_vsnprintf

//--- test.swift
// DEP: ___assert_rtn
// DEP: ___stack_chk_fail
// DEP: ___stack_chk_guard
Expand Down