halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

Provide a minimum OS version for MachO objects #8323

Closed alexreinking closed 1 week ago

alexreinking commented 1 week ago

This gives LLVM enough information to generate a "platform load-command" in the MachO object file.

Frustratingly, there is not a simple API that sets this directly; it must be passed in the os name.

Fixes #7941

alexreinking commented 1 week ago

Done! As I'm thinking about this, we should probably do something similar for iOS

alexreinking commented 1 week ago

@steven-johnson -- I changed the approach to use the LLVM-computed minimum compatible version (e.g. 11 on macOS/ARM). This should generalize to iOS, watchOS, tvOS, etc.

steven-johnson commented 3 days ago

I think this may have injected a link error in google when building for the iOS Simulator (which is not considered macOS by the linker), but I don't have time to diagnose before leaving for vacation -- hoping @vksnk can look at it next week