# llvm: Also apply the nobuiltin attribute for the no_builtin module option\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/bdca2d0f485682f78ea155df9f9f1cbb5f461ed8)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: bdca2d0f485682f78ea155df9f9f1cbb5f461ed8

Requested commit: bdca2d0f485682f78ea155df9f9f1cbb5f461ed8

Commit: bdca2d0f485682f78ea155df9f9f1cbb5f461ed8

Tree: 688050d6907e1d5c8d82dddb25ff5ea5f0452c23

Author: Alex Rønne Petersen

Committer: Alex Rønne Petersen

## Message

```
llvm: Also apply the nobuiltin attribute for the no_builtin module option.

From `zig build-exe --help`:

  -fno-builtin              Disable implicit builtin knowledge of functions

It seems entirely reasonable and even expected that this option should imply
both no-builtins on functions (which disables transformation of recognized code
patterns to libcalls) and nobuiltin on call sites (which disables transformation
of libcalls to intrinsics). We now match Clang's behavior for -fno-builtin.

In both cases, we're painting with a fairly broad brush by applying this to an
entire module, but it's better than nothing. #21833 proposes a more fine-grained
way to apply nobuiltin.

```

## Parents

- [e88501a09076e134675160c373bbfb5321038541](https://git.cafe/gitcafe/zig/commit/e88501a09076e134675160c373bbfb5321038541?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/bdca2d0f485682f78ea155df9f9f1cbb5f461ed8?format=markdown)
