0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src/Module.zig
Alex Rønne Petersen 399eaa3d41
compiler: default to PIC for objects and static libraries
This makes it so that objects and static libraries produced by Zig can be linked
into PIEs and shared libraries by default. This matches how almost all C/C++
toolchains are configured in Linux/BSD distros today.

For cases where the user knows better and wants to squeeze out some (usually
very minor) extra performance, they can just explicitly disable PIC when
producing the object or static library.
2026-10-07 09:50:37 +02:00

547 lines
20 KiB