From 221b76a84aaadacdcc6b54d1a8d3675511f088da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 20 Jun 2021 15:15:21 +0300 Subject: [PATCH] shorter tool_srcs --- toolchain/defs.bzl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index 3cf5a8e..9e290e3 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -196,11 +196,8 @@ def zig_build_macro(absolute_path, zig_include_root): constraint_values = target_config.constraint_values, ) - all_srcs = [] - ar_srcs = [":zig_compiler"] - linker_srcs = [":zig_compiler"] compiler_srcs = [":zig_compiler"] - tool_srcs = {"gcc": compiler_srcs, "ld": linker_srcs, "ar": ar_srcs} + tool_srcs = {tool: [":zig_compiler"] for tool in ["gcc", "ld", "ar"]} cxx_builtin_include_directories = [] for d in DEFAULT_INCLUDE_DIRECTORIES + target_config.includes: @@ -219,6 +216,7 @@ def zig_build_macro(absolute_path, zig_include_root): absolute_tool_paths[name] = "%s/%s" % (absolute_path, tool_path) tool_srcs[name].append(tool_path) + zig_cc_toolchain_config( name = target + "_cc_toolchain_config", target = target,