File specific build options in SwiftPM

How do you specify file-specific build options in SwiftPM?

Some of the files in one of my libraries requires building with ARC disabled.

I was going to try to help you out with OCMock so I got this far.
Unfortunately it utilizes the unsafeFlags options so you can't depend on that.

/// As some build flags could be exploited for unsupported or malicious
/// behavior, the use of unsafe flags make the products containing this
/// target ineligible to be used by other packages.

        name: "ocmock",
        dependencies: [],
    cSettings: [.headerSearchPath("../"),/* .headerSearchPath("OCMock"),*/  .unsafeFlags(["-fno-objc-arc"])]
    name: "ocmockTests",
    dependencies: ["ocmock"]),

I really would like to be able to pass the -F flag in the target. I have binary libraries (one of them is Firebase from the Carthage build). I can pass them as unsafe flag but then I can't depend on that library as soon as you do that. This is putting me in a bind. I made a proposal earlier but it got no response. This would tide us over until we get the final spec for importing binaries and I would happily update to the final agreed upon way of doing it, once that spec is agreed upon but right now, not sure what to do.

Terms of Service

Privacy Policy

Cookie Policy