Halide
Halide copied to clipboard
[macos] XCode 15 issues warnings for object files when linking
It appears XCode 15 now includes a custom (undocumented) version of LD which expects object files to be generated with a version number specified in the OS part of the LLVM target triple, otherwise it issues warnings like:
ld: warning: no platform load command found in 'static-lib.a[0](object-file.o)', assuming: macOS
This appears to have hit the JuliaLang team too, and they discovered they had to update their target triple for AOT compilation to include the OS version: https://github.com/JuliaLang/julia/pull/51830
More discussion here: https://github.com/JuliaLang/julia/issues/51562
So, it appears we may need to update the LLVM object file output to include the darwin/macos minimum deployment version in the target triple to be compatible with XCode 15 and future Apple toolchains.
We have an issue I need to report where the new linker generates bad object code on ARM. I mentioned it to Andrew. I doubt fixing this warning would fix the error in question as it is generating a straight up illegal instruction.
More info on this ... apparently Apple wants LC_BUILD_VERSION to be set for all valid mach-o object files: https://github.com/rust-lang/rust/pull/114114