Skip to content

Commit

Permalink
bazel: Introduce __TOOLCHAIN_SYSROOT__
Browse files Browse the repository at this point in the history
This will be useful later, when we update the toolchain to one
based on CentOS Stream 9.

Suggested-by: Roman Mohr <[email protected]>
Signed-off-by: Andrea Bolognani <[email protected]>
  • Loading branch information
andreabolognani committed Oct 27, 2022
1 parent 9c6bccf commit 85fc5d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bazel/toolchain/x86_64-none-linux-gnu/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def _impl(ctx):
),
]

# Update the value of __TOOLCHAIN_SYSROOT__ every time the list
# of cxx_builtin_include_directories has been modified.
#
# This is needed to make bazel realize that the updated toolchain
# is different from the previous one and handle caching correctly.
#
# https://github.com/kubevirt/kubevirt/pull/8404#issuecomment-1275096374
default_compiler_flags = feature(
name = "default_compiler_flags",
enabled = True,
Expand All @@ -77,6 +84,7 @@ def _impl(ctx):
"-D__DATE__=\"redacted\"",
"-D__TIMESTAMP__=\"redacted\"",
"-D__TIME__=\"redacted\"",
"-D__TOOLCHAIN_SYSROOT__=\"centos-stream-8\"",
],
),
],
Expand Down

0 comments on commit 85fc5d9

Please sign in to comment.