Allow extra env vars on OSX toolchain config
Just like we allow `tool_paths_overrides`.
Closes
@@ -4555,7 +4555,7 @@ def _impl(ctx):
key = "APPLE_SDK_PLATFORM",
value = "%{apple_sdk_platform_value}",
),
- ],
+ ] + [env_entry(key = key, value = value) for key, value in ctx.attr.extra_env.items()],
),
],
)
@@ -6397,6 +6397,7 @@ cc_toolchain_config = rule(
"compiler": attr.string(),
"cxx_builtin_include_directories": attr.string_list(),
"tool_paths_overrides": attr.string_dict(),
+ "extra_env": attr.string_dict(),
"_xcode_config": attr.label(default = configuration_field(
fragment = "apple",
name = "xcode_config_label",
