How do you specify file-specific build options in SwiftPM?
Some of the files in one of my libraries requires building with ARC disabled.
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.
.target(
name: "ocmock",
dependencies: [],
cSettings: [.headerSearchPath("../"),/* .headerSearchPath("OCMock"),*/ .unsafeFlags(["-fno-objc-arc"])]
),
.testTarget(
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.
I really would like to be able to pass the
-F
flag in the target.
Same here.
We did finally get the support for binary targets but there still is no way to have a Swift package depend on a Carthage dependency. Or am I missing something?
Please let me know if you ever found a way to get around this. (The closest thing I have come up with so far, is described in this thread.)