Static Methodswift-package-manager 6.0.1PackageDescription
unsafeFlags(_:_:)
Set unsafe flags to pass arbitrary command-line flags to the corresponding build tool.
BuildSettings.swift:310- SwiftPM
- 5.0+
static func unsafeFlags(_ flags: [String], _ condition: BuildSettingCondition? = nil) -> SwiftSetting
Parameters
As the usage of the word “unsafe” implies, Swift Package Manager can’t safely determine if the build flags have any negative side effect on the build since certain flags can change the behavior of how it performs a build.
As some build flags can be exploited for unsupported or malicious behavior, the use of unsafe flags makes the products containing this target ineligible for use by other packages.
See also
static func define(String, BuildSettingCondition?
) -> SwiftSetting Defines a compilation condition.
Other members in extension
Types
Type members
static func enableExperimentalFeature(String, BuildSettingCondition?
) -> SwiftSetting Enable an experimental feature with the given name.
static func enableUpcomingFeature(String, BuildSettingCondition?
) -> SwiftSetting Enable an upcoming feature with the given name.
static func interoperabilityMode(InteroperabilityMode, BuildSettingCondition?
) -> SwiftSetting Enable Swift interoperability with a given language.
static func swiftLanguageMode(SwiftLanguageMode, BuildSettingCondition?
) -> SwiftSetting Defines a
-language-mode
to pass to the corresponding build tool.
Show obsolete interfaces (1)
Hide obsolete interfaces
static func swiftLanguageVersion(SwiftVersion, BuildSettingCondition?
) -> SwiftSetting Defines a
-swift-version
to pass to the corresponding build tool.