install.bzl 575 B

123456789101112131415161718
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. """Install-related rules."""
  5. def _install_path_rule_impl(ctx):
  6. """Turns the install path into a variable for rules to use."""
  7. return [
  8. platform_common.TemplateVariableInfo({
  9. "INSTALL_PATH": ctx.build_setting_value,
  10. }),
  11. ]
  12. install_path_rule = rule(
  13. implementation = _install_path_rule_impl,
  14. build_setting = config.string(flag = True),
  15. )