diff options
author | Dmitry Lomov <dslomov@google.com> | 2016-02-15 16:15:03 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-16 09:39:56 +0000 |
commit | 9d40a60efec40add9443edbd75b77cdccbbc43dc (patch) | |
tree | 5f8db65400fcd5a84cee4678505cff5b9ffb55ac /src | |
parent | fa465f6f6216c5a3202964edf78e085cb19d5195 (diff) |
On Windows, build ``bazel.exe`` instead of just ``bazel``.
Needed for #276.
--
MOS_MIGRATED_REVID=114693711
Diffstat (limited to 'src')
-rw-r--r-- | src/BUILD | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -161,6 +161,26 @@ genrule( "_notools", ]] +# Build an executable named `bazel.exe`. +# Works on all platforms but only makes sense on Windows. +# Workaround for non-configurability of genrule's `outs` attribute. +[genrule( + name = "bazel-bin" + suffix + ".exe", + srcs = [":bazel-bin" + suffix], + outs = ["bazel" + suffix + ".exe"], + cmd = "cp $(location :bazel-bin" + suffix + ") $@", + executable = 1, + output_to_bindir = 1, + visibility = [ + "//scripts:__pkg__", # For bash completion generation + "//scripts/packages:__pkg__", # For installer generation + "//src/test:__subpackages__", # For integration tests + ], +) for suffix in [ + "", + "_notools", +]] + config_setting( name = "darwin", values = {"cpu": "darwin"}, |