Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version string to sysimg triple #51830

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/aotcompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,13 @@ void jl_dump_native_impl(void *native_code,
TheTriple.setObjectFormat(Triple::COFF);
} else if (TheTriple.isOSDarwin()) {
TheTriple.setObjectFormat(Triple::MachO);
TheTriple.setOS(llvm::Triple::MacOSX);
SmallString<16> Str;
Str += "macosx";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This platform doesn't really seem to exist anymore. The last release appears to have been 10.4. The current Apple platform is named darwin and the release numbers of it are of the kernel, so OS 10.14 would correspond to XNU release 18.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoyingly ld64 still expects it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I learnt it the hard way: JuliaPackaging/BinaryBuilderBase.jl#285

if (TheTriple.isAArch64())
Str += "11.0.0"; // Update this if MACOSX_VERSION_MIN changes
else
Str += "10.14.0";
TheTriple.setOSName(Str);
vtjnash marked this conversation as resolved.
Show resolved Hide resolved
}
Optional<Reloc::Model> RelocModel;
if (TheTriple.isOSLinux() || TheTriple.isOSFreeBSD()) {
Expand Down