Draft: Attempt at Mac OS compilation
Attempt to get a working macos branch. This is a continuation of the work in https://github.com/motiejus/hermetic_cc_toolchain/tree/macos .
NOTE: I have no idea what I'm doing. I'm piecing together the previous threads about sysroot from the readme. I have no idea what the zig or gcc options mean.
There are a number of hacks in this branch, so this is still WIP.
TODOs:
- [ ] Commits are messy and aren't yet cleaned up for review
- [ ] Identify what's hacky/needs to be removed
- [ ] Verify the options
- [ ] Test with more use cases
Fixes #10
@chrisirhc nice work so far! Happy to help test this when ready.
Realized that hexops is an incomplete sysroot, so I went with unpacking a pkg. Now I'm hitting:
external/go_sdk/pkg/tool/darwin_amd64/link: running external/hermetic_cc_toolchain~~toolchains~zig_sdk/tools/aarch64-macos-sdk.14.4/c++ failed: exit status 1
error: symbol _runtime.covctrs not attached to any (sub)section
note: while parsing /var/folders/rg/8yzx68lj705cjn8q0pzxv59w0000gn/T/go-link-1625103760/go.o
link: error running subcommand external/go_sdk/pkg/tool/darwin_amd64/link: exit status 2
I believe it's the issue reported in https://github.com/ziglang/zig/issues/20243
But I guess this is progress.
Hi @chrisirhc - just wondering whether you're still working on this? Or would you be open to someone else picking up from here? (not necessarily me!)
Hi @chrisirhc - just wondering whether you're still working on this? Or would you be open to someone else picking up from here? (not necessarily me!)
I'm not actively working on this. It's currently in a stuck state. I'm not sure what to try. Definitely open to someone else picking it up from here.
To note: https://news.ycombinator.com/item?id=43268431 mentions https://github.com/tpoechtrager/osxcross