Skip to content

Commit f8d4526

Browse files
committed
[embedded] Consider Linux mangling (no _ prefix) in test/embedded/dependencies.swift
1 parent c076b58 commit f8d4526

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/embedded/dependencies.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded %s -c -o %t/a.o
33

44
// RUN: grep DEP\: %s | sed 's#// DEP\: ##' | sort > %t/allowed-dependencies.txt
5+
6+
// Linux/ELF doesn't use the "_" prefix in symbol mangling.
7+
// RUN: if [ %target-os == "linux-gnu" ]; then sed -E -i -e 's/^_(.*)$/\1/' %t/allowed-dependencies.txt; fi
8+
59
// RUN: %llvm-nm --undefined-only --format=just-symbols %t/a.o | sort | tee %t/actual-dependencies.txt
610

711
// Fail if there is any entry in actual-dependencies.txt that's not in allowed-dependencies.txt

0 commit comments

Comments
 (0)