File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend -enable-experimental-feature Embedded -no-allocations %s -c -o %t/a.o
3
+
4
+ // 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
+
9
+ // RUN: %llvm-nm --undefined-only --format=just-symbols %t/a.o | sort | tee %t/actual-dependencies.txt
10
+
11
+ // Fail if there is any entry in actual-dependencies.txt that's not in allowed-dependencies.txt
12
+ // RUN: test -z "`comm -13 %t/allowed-dependencies.txt %t/actual-dependencies.txt`"
13
+
14
+ // DEP: ___stack_chk_fail
15
+ // DEP: ___stack_chk_guard
16
+ // DEP: ___divti3
17
+ // DEP: ___modti3
18
+ // DEP: _memset
19
+ // DEP: _putchar
20
+
21
+ // RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
22
+ // RUN: %target-clang %t/a.o %t/print.o -o %t/a.out
23
+ // RUN: %target-run %t/a.out | %FileCheck %s
24
+
25
+ // REQUIRES: swift_in_compiler
26
+ // REQUIRES: executable_test
27
+ // REQUIRES: optimized_stdlib
28
+ // REQUIRES: OS=macosx || OS=linux-gnu
29
+ // UNSUPPORTED: OS=linux-gnu && CPU=aarch64
30
+
31
+ print ( " Hello Embedded Swift! " ) // CHECK: Hello Embedded Swift!
32
+ print ( 42 ) // CHECK: 42
33
+ print ( false ) // CHECK: false
You can’t perform that action at this time.
0 commit comments