Skip to content

Commit 3c71ada

Browse files
authored
Merge pull request #37819 from artemcm/55TBTToLinker
[5.5] Pass .tbd inputs down to the linker invocation.
2 parents 959c47b + 8c6b953 commit 3c71ada

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/Driver/DarwinToolChains.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,12 @@ toolchains::Darwin::addLinkerInputArgs(InvocationInfo &II,
254254
} else {
255255
addPrimaryInputsOfType(Arguments, context.Inputs, context.Args,
256256
file_types::TY_Object);
257+
addPrimaryInputsOfType(Arguments, context.Inputs, context.Args,
258+
file_types::TY_TBD);
257259
addPrimaryInputsOfType(Arguments, context.Inputs, context.Args,
258260
file_types::TY_LLVM_BC);
259261
addInputsOfType(Arguments, context.InputActions, file_types::TY_Object);
262+
addInputsOfType(Arguments, context.InputActions, file_types::TY_TBD);
260263
addInputsOfType(Arguments, context.InputActions, file_types::TY_LLVM_BC);
261264
}
262265

test/Driver/linker-tbd.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// REQUIRES: OS=macosx
2+
// Ensure .tbd input files are forwarded to the linker.
3+
4+
// RUN: %empty-directory(%t)
5+
// RUN: touch %t/foo.tbd
6+
// RUN: %swiftc_driver_plain -driver-print-jobs -target x86_64-apple-macosx10.9 %S/../Inputs/empty.swift %t/foo.tbd | %FileCheck %s
7+
8+
// CHECK: bin/ld{{"? }}
9+
// CHECK-SAME: foo.tbd

0 commit comments

Comments
 (0)