PackageCompiler.jl
PackageCompiler.jl copied to clipboard
macOS: Conditionally add `-Wl,-ld_classic` for Xcode CLT >= 15
Replaces #935 (closes #935) Reference #738
This is based on #935. All credit goes to @PhilReinhold for providing the fix and @jayscook for opening the original PR (#935).
This PR differs slightly from #935. #935 used a try-catch. This PR uses ignorestatus()
to ignore non-zero exit codes from running the pkgutil ...
command, and uses isnothing()
to handle the case where the regex does not match. Also, this PR factors out the "detect CLT major version" functionality out into a separate helper function.
Also, this PR now addresses https://github.com/JuliaLang/PackageCompiler.jl/pull/935#discussion_r1554017266
We do not add these flags for CLT versions <= 14.