mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialize the `-public-autolink-library <name>` option to the moduleinterface file because it can affect the LINK_LIBRARY entries in a swiftmodule file. Without saving the option, the library won't be linked when a module compiled from the moduleinterface is used. This change marks the `-public-autolink-library` option as a module interface option and reads it when building a swiftmodule by module loader.
7 lines
470 B
Swift
7 lines
470 B
Swift
// 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 -public-autolink-library Bar
|
|
// 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
|
|
|
|
// CHECK: link library: Bar
|