mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[bitcode] Pass -bitcode_bundle to the linker when linking via swiftc.
...and either -embed-bitcode or -embed-bitcode-marker is passed. This is the same behavior as Clang. rdar://problem/20246442 Swift SVN r29387
This commit is contained in:
@@ -715,6 +715,11 @@ Job *darwin::Linker::constructJob(const JobAction &JA,
|
|||||||
Arguments.push_back("-application_extension");
|
Arguments.push_back("-application_extension");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Args.hasArg(options::OPT_embed_bitcode,
|
||||||
|
options::OPT_embed_bitcode_marker)) {
|
||||||
|
Arguments.push_back("-bitcode_bundle");
|
||||||
|
}
|
||||||
|
|
||||||
if (!OI.SDKPath.empty()) {
|
if (!OI.SDKPath.empty()) {
|
||||||
Arguments.push_back("-syslibroot");
|
Arguments.push_back("-syslibroot");
|
||||||
Arguments.push_back(Args.MakeArgString(OI.SDKPath));
|
Arguments.push_back(Args.MakeArgString(OI.SDKPath));
|
||||||
|
|||||||
@@ -13,14 +13,18 @@
|
|||||||
// CHECK-FRONT: -emit-bc
|
// CHECK-FRONT: -emit-bc
|
||||||
// CHECK-FRONT: -frontend
|
// CHECK-FRONT: -frontend
|
||||||
// CHECK-FRONT: -c
|
// CHECK-FRONT: -c
|
||||||
// CHECK-FRONT: -embed-bitcode
|
// CHECK-FRONT: -embed-bitcode{{ }}
|
||||||
// CHECK-FRONT: -disable-llvm-optzns
|
// CHECK-FRONT: -disable-llvm-optzns
|
||||||
|
// CHECK-FRONT: ld{{"? }}
|
||||||
|
// CHECK-FRONT: -bitcode_bundle
|
||||||
|
|
||||||
// RUN: %target-swiftc_driver -embed-bitcode-marker %s 2>&1 -### | FileCheck %s -check-prefix=CHECK-MARKER
|
// RUN: %target-swiftc_driver -embed-bitcode-marker %s 2>&1 -### | FileCheck %s -check-prefix=CHECK-MARKER
|
||||||
// CHECK-MARKER: -frontend
|
// CHECK-MARKER: -frontend
|
||||||
// CHECK-MARKER: -c
|
// CHECK-MARKER: -c
|
||||||
// CHECK-MARKER: -embed-bitcode-marker
|
// CHECK-MARKER: -embed-bitcode-marker
|
||||||
// CHECK-MARKER-NOT: -frontend
|
// CHECK-MARKER-NOT: -frontend
|
||||||
|
// CHECK-MARKER: ld{{"? }}
|
||||||
|
// CHECK-MARKER: -bitcode_bundle
|
||||||
|
|
||||||
// RUN: %target-swiftc_driver -embed-bitcode -Xcc -DDEBUG -Xllvm -fake-llvm-option -c -emit-module %s 2>&1 -### | FileCheck %s -check-prefix=CHECK-MODULE
|
// RUN: %target-swiftc_driver -embed-bitcode -Xcc -DDEBUG -Xllvm -fake-llvm-option -c -emit-module %s 2>&1 -### | FileCheck %s -check-prefix=CHECK-MODULE
|
||||||
// CHECK-MODULE: -frontend
|
// CHECK-MODULE: -frontend
|
||||||
|
|||||||
Reference in New Issue
Block a user