Reputation: 10982
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...).
Upvotes: 10
Views: 7395
Reputation: 1865
Quoting the documentation of --symlink_prefix:
Warning: the special functionality for
/
will be deprecated soon; use--experimental_convenience_symlinks=ignore
instead.
Upvotes: 11
Reputation: 1805
--symlink_prefix=/
will stop these symlinks from being created.
https://docs.bazel.build/versions/master/command-line-reference.html
Upvotes: 10