Skip to content

Commit

Permalink
Exclude kernel from asan
Browse files Browse the repository at this point in the history
  • Loading branch information
mempler committed Dec 16, 2023
1 parent bb9a39f commit ef96b22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address

# Skip ASAN for stuff that doesn't work with it. E.G. the kernel.
# as it requires special treatment.
build:asan --build_tag_filters=^no_asan

# User-specific .bazelrc
try-import %workspace%/user.bazelrc

3 changes: 3 additions & 0 deletions kernel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ nasm_cc_binary(
r"$(location x86_64-unknown-elf.ld)",
],
linkstatic = True,
tags = [
"no_asan",
],
target_compatible_with = [
# The kernel can only be built on a linux machine (or cross-compiled from macos)
"@platforms//os:linux",
Expand Down

0 comments on commit ef96b22

Please sign in to comment.