diff --git a/Package.swift b/Package.swift index 4912fbc..911d713 100644 --- a/Package.swift +++ b/Package.swift @@ -17,7 +17,12 @@ let package = Package( ] ) -if Context.environment["SKIP_BRIDGE"] ?? "0" != "0" { +// SKIP_DYNAMIC_LIBRARIES and SKIP_BRIDGE both enforce building as dynamic +// libraries; SKIP_BRIDGE additionally puts the skipstone plugin in bridge mode +let bridgeMode = (Context.environment["SKIP_BRIDGE"] ?? "0") != "0" +let forceDylib = bridgeMode || (Context.environment["SKIP_DYNAMIC_LIBRARIES"] ?? "0") != "0" + +if forceDylib { // all library types must be dynamic to support bridging package.products = package.products.map({ product in guard let libraryProduct = product as? Product.Library else { return product }