mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:41:27 +01:00
Add remaining clang symlinks and test them (#5050)
We only had the single `clang` symlink, but in case its useful to use the toolchain with some other build system that expects `clang++`, or even `clang-cl` or `clang-cpp`, fill in the rest of the symlinks. The different `clang` flavors don't really need anything to support in the subcommand as there is already an excellent way to get the exact behavior of these names using Clang's `--driver-mode` flag, so these just use that. That makes this change really *only* about busybox behavior. We don't really have a dedicated test path for things that are only exposed via the symlinks, so I've added a simple Python integration test we can use for that. I can backfill some testing of other symlinks if useful (the `ld.lld` one might be worthwhile), although there is minimal interesting logic to cover there.
This commit is contained in:
@@ -34,9 +34,12 @@ def log(s: str) -> None:
|
||||
|
||||
|
||||
def filter_targets(bazel: Path, targets: str) -> str:
|
||||
# Need to quote targets for inclusion in another query.
|
||||
quoted_targets = "\n".join([f'"{t}"' for t in targets.splitlines()])
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w+") as tmp:
|
||||
query = (
|
||||
f"let t = set({targets}) in "
|
||||
f"let t = set({quoted_targets}) in "
|
||||
"kind(rule, $t) except attr(tags, manual, $t)\n"
|
||||
)
|
||||
query_lines = query.splitlines()
|
||||
|
||||
Reference in New Issue
Block a user