run_bazel.py 564 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env python3
  2. """Runs bazel on arguments.
  3. This is provided for other scripts to run bazel without requiring it be
  4. manually installed.
  5. """
  6. __copyright__ = """
  7. Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  8. Exceptions. See /LICENSE for license information.
  9. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  10. """
  11. import os
  12. import sys
  13. import scripts_utils # type: ignore
  14. def main() -> None:
  15. bazel = scripts_utils.locate_bazel()
  16. os.execv(bazel, [bazel] + sys.argv[1:])
  17. if __name__ == "__main__":
  18. main()