Moving bazel-bin symlink somewhere else?

Is there a non-painful way to have bazel-bin symlink moved to some other location and still be able to do bazel test commands as usual?

The philosophical problem is that having reponame/bazel-bin puts object files in the same hierarchy as the source files.

The practical problem is that I keep my github repo synced across different machines, so having bazel-bin in the hierarchy forces my syncing tool (dropbox) to fswatch >1M files

Answers

You can use the --symlink_prefix flag. For example, bazel build --symlink_prefix=/tmp/somewhere_else will create the symlinks under /tmp/somewhere_else and bazel build --symlink_prefix=/ will not create any symlinks at all.

Docs are here: https://docs.bazel.build/versions/master/command-line-reference.html#build-options

Posted on by Adam

Relevant tags