diff options
| author | Motiejus Jakštys <motiejus@jakstys.lt> | 2022-06-16 15:42:35 +0300 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-20 13:39:33 +0200 |
| commit | 98138ba78c1540830a4fdb0537ed6ad5c7b57e7a (patch) | |
| tree | 8ff0a80295d0702fbe63bf8849c4b390ba94bd50 /test/link/objcpp/build.zig | |
| parent | a97a39bea6022fb7449620384641cdfa70303f8d (diff) | |
| download | zig-98138ba78c1540830a4fdb0537ed6ad5c7b57e7a.tar.gz zig-98138ba78c1540830a4fdb0537ed6ad5c7b57e7a.zip | |
[MachO] add -pagezero_size
Pass `-pagezero_size` to the MachO linker. This is the final
"unsupported linker arg" that I could chase that CGo uses. After this
and #11874 we may be able to fail on an "unsupported linker arg" instead
of emiting a warning.
Test case:
zig=/code/zig/build/zig
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC="$zig cc -target x86_64-macos" CXX="$zig c++ -target x86_64-macos" go build -a -ldflags "-s -w" cgo.go
I compiled a trivial CGo program and executed it on an amd64 Darwin
host.
To be honest, I am not entirely sure what this is doing. This feels
right after reading what this argument does in LLVM sources, but I am by
no means qualified to make MachO pull requests. Will take feedback.
Diffstat (limited to 'test/link/objcpp/build.zig')
0 files changed, 0 insertions, 0 deletions
