Skip to content

Commit 26198fc

Browse files
committed
Fix and add tests
1 parent 1945d6a commit 26198fc

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

llvm/docs/CommandGuide/dsymutil.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ OPTIONS
7070

7171
Print this help output.
7272

73+
.. option:: --include-swiftmodules-from-interface
74+
75+
Whether or not to copy binary swiftmodules built from textual .swiftinterface
76+
files into the dSYM bundle. These typically come only from the SDK (since
77+
textual interfaces require library evolution) and thus are a waste of space to
78+
copy into the bundle. Turn this on if the swiftmodules are different from
79+
those in the SDK.
80+
7381
.. option:: --keep-function-for-static
7482

7583
Make a static variable keep the enclosing function even if it would have been
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# RUN: dsymutil -include-swiftmodules-from-interface -verbose -oso-prepend-path=%p -y -o %t.dSYM %s | FileCheck %s
2+
#
3+
# RUN: dsymutil -include-swiftmodules-from-interface --linker parallel -verbose -oso-prepend-path=%p -y %s -o %t-parallel.dSYM | FileCheck %s
4+
#
5+
# To regenerate:
6+
# echo ''>I.swift
7+
# echo ''>B.swift
8+
# echo 'import I'>main.swift
9+
# xcrun swiftc -emit-module-interface-path I.swiftinterface -enable-library-evolution I.swift
10+
# xcrun swiftc -emit-module-path B.swiftmodule B.swift -Xfrontend -no-serialize-debugging-options
11+
# xcrun swiftc -explicit-module-build main.swift -I. -module-cache-path cache -g -Xfrontend -no-serialize-debugging-options
12+
# output is "B.swiftmodule" and "cache/I*.swiftmodule"
13+
#
14+
# CHECK-NOT: Skipping compiled textual Swift interface: {{.*}}/Inputs/Binary.swiftmodule
15+
# CHECK-NOT: Skipping compiled textual Swift interface: {{.*}}/Inputs/FromInterface.swiftmodule
16+
17+
#
18+
---
19+
triple: 'arm64-apple-darwin'
20+
objects:
21+
- filename: '../Inputs/Binary.swiftmodule'
22+
timestamp: 0
23+
type: 50
24+
symbols: []
25+
- filename: '../Inputs/FromInterface.swiftmodule'
26+
timestamp: 0
27+
type: 50
28+
symbols: []
29+
- filename: '../Inputs/FromInterface.swiftmodule'
30+
timestamp: 0
31+
type: 50
32+
symbols: []
33+
...

0 commit comments

Comments
 (0)