Improving the usability of C libraries in Swift
9 points by mpweiher
9 points by mpweiher
Not to be offensive, but the whole tooling for codegen looks gruesome, why does one have to specify the sdk and there is no default lookup or something?
All compilation on Mac and iOS via the platform toolchains is built around cross compilation, so specifying the intended SDK is the norm. The SDK selection also impacts the availability of APIs, default compilation flags, etc.
Most of the CLI tools do default to the host SDK, but that’s obviously hazardous. I’m not sure if this particular example is specifying the SDK out of necessity or to ensure exact behaviour demonstrated in the post.