3,471 questions
Best practices
0
votes
0
replies
56
views
What's the correct way to suppress errors of MSan using bazel?
I'm working on a downstream project of openxla, whose build system is bazel. And now, I'd like to enable MSan for our source tree.
It's quite easy to enable the MSan using the following bazelrc,
build:...
Best practices
0
votes
1
replies
74
views
Best practice for dependency modelling in a bazel C++ project?
I try to figure out a best practice for modelling the dependencies in bazel for a c++ project. Is there anything wrong in the following rules?
[implementation_deps]: (only available for cc_library) ...
Best practices
0
votes
0
replies
41
views
How to clean local Bazel repository cache "content_adressable" folder?
For local PC based development we have enabled the Bazel disk cache and repository cache.
The repository cache root folder has two subfolders:
contents
content-adressable
The "contents" ...
0
votes
0
answers
41
views
Bazel Query Command to get all the transitive external dependencies
I am using the java_export rule to publish an SDK:
load("@rules_jvm_external//:defs.bzl", "java_export")
java_export(
name = "sdk_maven",
maven_coordinates = &...
Best practices
0
votes
0
replies
44
views
When packaging a bash binary produced by Bazel, do I need to keep the rlocation/data location boilerplate?
I was trying to exercise with Bazel by packaging a deb package from a collection of scripts I'm writing to automate a few tasks at work. Right now, I keep them either in /usr/local/bin or \~/.local/...
Best practices
0
votes
0
replies
38
views
How should a Bazel wrapper find its runfiles?
I built this Bazel rule and in there, I created a wrapper executable like this:
dist_dir = ctx.actions.declare_directory(ctx.label.name)
[...]
launcher = ctx.actions.declare_file(ctx.label....
0
votes
1
answer
52
views
Building libtiff with bazel foreign_cc rule
On an M3 Mac using MacOS 26.1 and bazel 8.4.2 homebrew, I'm building libtiff where I have libjpeg_turbo as a dependency. When building this I'm getting a linking error regarding jsimd:
[ 73%] Linking ...
Advice
0
votes
0
replies
62
views
Make Bazel use either RUNFILES_DIR or RUNFILES_MANIFEST_FILE?
Bazel on Linux usually sets the RUNFILES_DIR environment variable but it may alternatively set RUNFILES_MANIFEST_FILE. General advice for scripts is to make your scripts capable of working with both. ...
0
votes
0
answers
69
views
Bazel build using rules_cc with clang-cl
I followed the instruction https://bazel.build/configure/windows#clang. However, I've got the error
"absolute path inclusion(s) found in rule [...]:
the source file [...] includes the following ...
0
votes
1
answer
71
views
How do I use the libjpeg_turbo module, that is in the BCR, as a dependency in my build? It compiles but does not link
I am trying to use Bazel to build an application that creates an image and uses libjpeg-turbo to save the image as a jpeg.
I am trying to use bzlmod to add the libjpeg_turbo dependency, from Bazel ...
3
votes
1
answer
241
views
Making a custom build target with Bazel to specify custom kernel config flags
I've been doing some kernel development on the Google pixel 9a "tegu" platform (latest version on https://developers.google.com/android/drivers), where Google uses Bazel to compile the ...
0
votes
0
answers
103
views
Compiling Tensorflow/tflite C++ for ios
I want to build a framework for iOS so that I can run inference in C++ on both Android and iOS via Flutter.
So far I have managed to compile the libs for Android and succesfully loaded a model on my ...
0
votes
0
answers
89
views
How do I make an alias that selects between a bunch of rules in bazel?
I have some cc_librarys that I wanna switch through depending on the platform. I was curious if there was any way to do this on bazel.
My end goal is to have something like
# Building a new library ...
0
votes
1
answer
47
views
How to expose kotlin package `import kotlin.test.Test` for a bazel `kt_jvm_test`
I'm trying to compile a very simple kotlin test file based off of the example at https://kotlinlang.org/docs/jvm-test-using-junit.html#create-a-test in order to prove that my setup in bazel is ...
0
votes
0
answers
36
views
Bazel Build issue in precheckin
I am trying to precheckin my changes. I do not get any build issue while running app locally but I am seeing following issue during precheckin process :
bazel-build | # Execution platform: //tools/...