diff options
author | 2017-07-13 17:11:18 +0200 | |
---|---|---|
committer | 2017-07-14 10:51:31 +0200 | |
commit | 528a1eac7d2638a492655cda8e18e80c4510583c (patch) | |
tree | 143271bb8394782f3e48b001886ef51f436bbc34 /tools/jdk/alias_rules.bzl | |
parent | 9dd30c92cee7e74cc307d941e3f1d77a232be340 (diff) |
Add *_alias rules to @bazel_tools so that people don't have to keep writing their own.
The alias_rules.bzl hack is required because Bazel at HEAD needs to be able to be built
with released Bazel, which doesn't know these rules yet.
RELNOTES: None.
PiperOrigin-RevId: 161808672
Diffstat (limited to 'tools/jdk/alias_rules.bzl')
-rw-r--r-- | tools/jdk/alias_rules.bzl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/jdk/alias_rules.bzl b/tools/jdk/alias_rules.bzl new file mode 100644 index 0000000000..71d1edb6c0 --- /dev/null +++ b/tools/jdk/alias_rules.bzl @@ -0,0 +1,25 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +def java_runtime_alias(name): + if hasattr(native, "java_runtime_alias"): + native.java_runtime_alias(name=name) + else: + pass + +def java_toolchain_alias(name): + if hasattr(native, "java_toolchain_alias"): + native.java_toolchain_alias(name=name) + else: + pass |