When you build a Bazel project, your WORKSPACE project root directory is populated by a bunch of convenience symlinks:
<workspace-name>/ <== The workspace directory
bazel-my-project => <...my-project> <== Symlink to execRoot
bazel-out => <...bin> <== Convenience symlink to outputPath
bazel-bin => <...bin> <== Convenience symlink to ...
bazel-genfiles => <...genfiles> <== Convenience symlink to ...
See the official doc, Bazel internals: Directory layout, for details.
My question: is there a Bazel option to avoid all these links to be generated or at least an option to tell Bazel to put all these links in another place (in /tmp/my-project
for instance)?
(My motivation is that I also use other tools that scan *.hpp and *.cpp files in my project directory, unfortunatly all the symlinks generated by Bazel are messing up the result...).
--symlink_prefix=/
will stop these symlinks from being created.
https://docs.bazel.build/versions/master/command-line-reference.html
Quoting the documentation of --symlink_prefix:
Warning: the special functionality for
/
will be deprecated soon; use--experimental_convenience_symlinks=ignore
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With