ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
34.91k stars 2.55k forks source link

zig cc doesn't pass through `-Wl,--large-address-aware` #21981

Open tmm1 opened 1 day ago

tmm1 commented 1 day ago

Zig Version

0.13.0

Steps to Reproduce and Observed Behavior

i have a i686-w64-mingw32-gcc wrapper for zig cc -target x86-windows-gnu

checking whether i686-w64-mingw32-gcc works... no
Failed commandline was:
--------------------------------------------------
i686-w64-mingw32-gcc conftest.c -m32  -Wall -I. -I$(SRCPATH) -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2   -Werror=unknown-warning-option -Werror=unknown-attributes -Werror=attributes -Werror=ignored-attributes   -lshell32 -m32   -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
error: unsupported linker arg: --large-address-aware
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
DIED: No working C compiler found.

it seems to be supported by lld: https://reviews.llvm.org/D40015

Expected Behavior

expect zig cc to pass through the argument

tmm1 commented 19 hours ago

another one that doesn't work is -Wl,--allow-multiple-definition