mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -344,10 +344,12 @@ static bool buildSwiftModuleFromSwiftInterface(
|
|||||||
}
|
}
|
||||||
|
|
||||||
LLVM_DEBUG(llvm::dbgs() << "Serializing " << OutPath << "\n");
|
LLVM_DEBUG(llvm::dbgs() << "Serializing " << OutPath << "\n");
|
||||||
|
FrontendOptions &FEOpts = SubInvocation.getFrontendOptions();
|
||||||
SerializationOptions SerializationOpts;
|
SerializationOptions SerializationOpts;
|
||||||
std::string OutPathStr = OutPath;
|
std::string OutPathStr = OutPath;
|
||||||
SerializationOpts.OutputPath = OutPathStr.c_str();
|
SerializationOpts.OutputPath = OutPathStr.c_str();
|
||||||
SerializationOpts.SerializeAllSIL = true;
|
SerializationOpts.SerializeAllSIL = true;
|
||||||
|
SerializationOpts.ModuleLinkName = FEOpts.ModuleLinkName;
|
||||||
SmallVector<FileDependency, 16> Deps;
|
SmallVector<FileDependency, 16> Deps;
|
||||||
if (collectDepsForSerialization(FS, SubInstance, InPath, ModuleCachePath,
|
if (collectDepsForSerialization(FS, SubInstance, InPath, ModuleCachePath,
|
||||||
Deps, Diags, OuterTracker)) {
|
Deps, Diags, OuterTracker)) {
|
||||||
|
|||||||
3
test/ParseableInterface/Inputs/TestModule.swift
Normal file
3
test/ParseableInterface/Inputs/TestModule.swift
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
public struct TestStruct {
|
||||||
|
public init() {}
|
||||||
|
}
|
||||||
10
test/ParseableInterface/linking-to-module.swift
Normal file
10
test/ParseableInterface/linking-to-module.swift
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// RUN: %empty-directory(%t)
|
||||||
|
|
||||||
|
// RUN: %target-build-swift -emit-library -module-name TestModule -module-link-name coreTestModuleKitUtilsTool %S/Inputs/TestModule.swift -emit-parseable-module-interface -o %t/libcoreTestModuleKitUtilsTool.%target-dylib-extension
|
||||||
|
// RUN: %target-swift-frontend -emit-ir -I %t -L %t -enable-parseable-module-interface %s | %FileCheck %s
|
||||||
|
|
||||||
|
import TestModule
|
||||||
|
|
||||||
|
_ = TestStruct()
|
||||||
|
|
||||||
|
// CHECK: -lcoreTestModuleKitUtilsTool
|
||||||
Reference in New Issue
Block a user