mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
compilation: forbid PIE for dynamic libraries
but allow for { .exe, .o, .a }. closes #17928
This commit is contained in:
parent
5de0636577
commit
569182dbb2
@ -1288,7 +1288,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
|||||||
const sysroot = options.sysroot orelse libc_dirs.sysroot;
|
const sysroot = options.sysroot orelse libc_dirs.sysroot;
|
||||||
|
|
||||||
const pie: bool = pie: {
|
const pie: bool = pie: {
|
||||||
if (options.output_mode != .Exe) {
|
if (is_dyn_lib) {
|
||||||
if (options.want_pie == true) return error.OutputModeForbidsPie;
|
if (options.want_pie == true) return error.OutputModeForbidsPie;
|
||||||
break :pie false;
|
break :pie false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user