2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-28 08:43:26 +00:00

Fix buildifier

This commit is contained in:
ozanarmagan 2023-03-16 15:26:38 +03:00
parent 12d7663143
commit 31d3003212

View file

@ -189,18 +189,18 @@ def is_debug_mode(ctx):
def pick_cpp_toolchain(cxx): def pick_cpp_toolchain(cxx):
"""Picks the right toolchain for the given cxx compiler """Picks the right toolchain for the given cxx compiler
Args: Args:
cxx: path to the cxx compiler cxx: path to the cxx compiler
Returns: Returns:
correct path to the cxx compiler correct path to the cxx compiler
""" """
cxx_splitted = cxx.split("/") cxx_splitted = cxx.split("/")
if(cxx_splitted[-1].startswith("gcc")): if (cxx_splitted[-1].startswith("gcc")):
cxx_splitted[-1] = cxx_splitted[-1].replace("gcc", "g++") cxx_splitted[-1] = cxx_splitted[-1].replace("gcc", "g++")
cxx = "/".join(cxx_splitted) cxx = "/".join(cxx_splitted)
if(cxx_splitted[-1].startswith("clang")): if (cxx_splitted[-1].startswith("clang")):
cxx_splitted[-1] = cxx_splitted[-1].replace("clang", "clang++") cxx_splitted[-1] = cxx_splitted[-1].replace("clang", "clang++")
cxx = "/".join(cxx_splitted) cxx = "/".join(cxx_splitted)
return cxx return cxx