aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig4
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