mrustc
mrustc copied to clipboard
Fix bootstrapping for macOS for 1.39.0
- Modify 1.39.0 patch to remove assertions about structure size due to alignment differences and workaround a linker issue searching for
CFMutableAttributedStringGetTypeID
by pulling in patch fromcore-foundation
- Fix incorrect signature in LLVM
add_overflow
intrinsics - Change the macOS target name to
x86_64-apple-darwin
to match Rust triple.
cc @woachk
Hello,
Please copy the RUSTC_TARGET define for Darwin from minicargo.mk, to take into account arm64 Mac hardware. (In run_rustc/Makefile)
The build-1.39.0.sh change also doesn’t need to be there.
Apart from those things, this looks good.
Just the peanut gallery here, but can you explain why the static_assert_size
calls have been removed?
Edit: Sorry, I misread the PR. Coffee still kicking in...
Taking a serious look at this now (sorry it's taken so long).
- Could you update the patch file to make the size checks conditional on not using mrustc?
not(rust_compiler = "mrustc")
- I'm still kinda curious as to why there was a null pointer in that deref chain
- Is
-darwin
always the correct target name? Or is-macos
also valid (if it is also valid, then don't remove the target from the spec)
@arlosi Sorry, but a large amount of your changes have snuck in via other means. Could you rebase this with just the remaining changes (and address the comments in https://github.com/thepowersgang/mrustc/pull/192#issuecomment-1001519202)
Sure, I can update the PR today.
- I'll add the conditional compilation for
not(rust_compiler = "mrustc")
- Looks like the null deref question is resolved now.
-
-darwin
is always the correct name AFAIK.-macos
isn't mentioned in the official rust compiler documentation.
I don't have access to the Mac hardware I used when I originally made this change, so I haven't re-validated the full bootstrap of mrustc -> 1.39.0 -> 1.39.0 -> 1.40.0 with the latest PR updates. It worked with the original version of the change.
I have used a Mac CI machine to test that mrustc can build rustc 1.39.0 with this updated change but I can't test further than that.
I believe that most of these changes were included in #241 - which has now been merged.
@thepowersgang if you willing to merge it, you may use version which is applied to last master and which I've used for my MacPorts port: https://github.com/catap/mrustc/commit/3d24d451b23104b58f8afc9d07d1cd341b296f5a
Wait, this is for 1.39's patch set, not 1.54's. @arlosi Part of this has been applied, and some has been addressed. Could you update the patch set?
@thepowersgang my commit is for 1.39.0 also ;)
I can't move forward with 1.54.0.
Oh yeah, point still stands. This PR needs to be either updated against master, or closed.
Most of this change has already been merged via other PRs, and work has moved to 1.54. Closing.