diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-05 15:21:20 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-05 15:21:20 -0700 |
| commit | 2ee864ca5eb46468e8e0f4237a5532b76b60d715 (patch) | |
| tree | a70213c0c4c9f5c861e4c784e5980d6b60fea08d /src/codegen | |
| parent | 927e59d0532c77e2fb3ead0c9c4f7ead0454785a (diff) | |
| download | zig-2ee864ca5eb46468e8e0f4237a5532b76b60d715.tar.gz zig-2ee864ca5eb46468e8e0f4237a5532b76b60d715.zip | |
CLI: add support for -fno-builtin
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/llvm.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 590cee3d73..1b7e33a3a4 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -2347,7 +2347,9 @@ pub const DeclGen = struct { if (comp.unwind_tables) { dg.addFnAttr(llvm_fn, "uwtable"); } - if (comp.bin_file.options.skip_linker_dependencies) { + if (comp.bin_file.options.skip_linker_dependencies or + comp.bin_file.options.no_builtin) + { // The intent here is for compiler-rt and libc functions to not generate // infinite recursion. For example, if we are compiling the memcpy function, // and llvm detects that the body is equivalent to memcpy, it may replace the |
