mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ModuleInterface: preserve AutolinkForceLoad option when generating .swiftmodule from .swiftinterface
This change ensures using .swiftmodule built from source has the same behavior as using .swiftmodule built from .swiftinterface. A swift-ide-test utility is added to print linked libraries from a Swift module for testing purposes. rdar://58057556
This commit is contained in:
8
test/ModuleInterface/force-load-autolink.swift
Normal file
8
test/ModuleInterface/force-load-autolink.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -typecheck -module-name Foo -emit-module-interface-path %t/Foo.swiftinterface %s -module-link-name Foo -enable-library-evolution -autolink-force-load
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/Foo.swiftmodule %t/Foo.swiftinterface
|
||||
// RUN: %target-swift-ide-test -print-module-metadata -module-to-print Foo -I %t -source-filename %s | %FileCheck %s
|
||||
|
||||
public func foo() {}
|
||||
|
||||
// CHECK: link library: Foo, force load: true
|
||||
Reference in New Issue
Block a user