<div dir="ltr">I am trying to compile code for macOS that depends on the AudioKit framework.<div><br></div><div>This can be done using `swiftc`, as long as one passes the flag `-target x86_64-apple-macosx10.11`.<br>
</div><div><br></div><div>So, in theory, it should be possible to use `swift build` by passing it these flags:</div><div><br></div><div> -Xswiftc -target -Xswiftc x86_64-apple-<wbr>macosx10.11</div><div><br></div><div>Unfortunately, `swift build` fails with this error:</div><div><br></div><div> error: module file's minimum deployment target is OS X v10.11</div><div><br></div><div>By passing `--verbose` to `swift build`, I learned that `swift build` is invoking `swiftc` with two copies of the `-target` flag:</div><div><br></div><div> -target x86_64-apple-macosx10.11 -target x86_64-apple-macosx10.10</div><div><br></div><div>... and the second one is apparently overriding the first. It seems this issue was noted on the swift-build-dev list several months ago: <a href="https://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160919/000637.html" target="_blank">https://lists.swift.org/<wbr>pipermail/swift-build-dev/<wbr>Week-of-Mon-20160919/000637.<wbr>html</a></div><div><br></div><div>I am running macOS 10.11 with Xcode 8.2.1. Has the bug been fixed in a development version of swift? If not, what work-around do you suggest?</div><div><br></div><div>Perhaps it would be simplest to recompile the AudioKit framework so that it has a minimum deployment target of macosx10.10? That project's scripts use xcodebuild to compile the framework, and they do not seem to explicitly specify a deployment target anywhere, but presumably this can be done by adding a line to the appropriate .xcconfig file. Does anyone know what line would need to be added?</div><div><br></div><div>- Aaron</div><div><br></div></div>