mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Because install_paths is not presently validated, and it's resolved after the `SetWorkingDirForBazel` call, if a relative path is used with bazel then it would fail silently. This starts making the driver share install path errors, and starts changing how `//toolchain` launches `carbon`. Note the implementation is still brittle and will break with symlinks. That's something I plan to address as part of busyboxing.
20 lines
470 B
Python
20 lines
470 B
Python
#!/usr/bin/env python3
|
|
|
|
"""Runs the tool specified in argv.
|
|
|
|
This script is essentially just a bounce-through to get an appropriate arg0.
|
|
See the TODO in run_tool.bzl.
|
|
"""
|
|
|
|
__copyright__ = """
|
|
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
Exceptions. See /LICENSE for license information.
|
|
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
if __name__ == "__main__":
|
|
os.execv(sys.argv[1], sys.argv[1:])
|