| author | |
| committer | |
| log | e5c974fa5cd3f9ed49463b597954a053da91de6d |
| tree | 121479e42157df1cbd79352fe135c212f887485a |
| parent | 9002977051b810ec023589c7e89283acb3ca9fbf |
| signature |
1 files changed, 4 insertions(+), 1 deletions(-)
lib/std/os/linux.zig+4-1| ... | ... | @@ -393,7 +393,10 @@ const extern_getauxval = switch (builtin.zig_backend) { |
| 393 | 393 | }; |
| 394 | 394 | |
| 395 | 395 | comptime { |
| 396 | if (extern_getauxval) { | |
| 396 | const root = @import("root"); | |
| 397 | // Export this only when building executable, otherwise it is overriding | |
| 398 | // the libc implementation | |
| 399 | if (extern_getauxval and (builtin.output_mode == .Exe or @hasDecl(root, "main"))) { | |
| 397 | 400 | @export(getauxvalImpl, .{ .name = "getauxval", .linkage = .weak }); |
| 398 | 401 | } |
| 399 | 402 | } |