From 0db5d2d9e6554fd2f0e973ea0dceed5f022defb7 Mon Sep 17 00:00:00 2001 From: Jeremy Volkman Date: Fri, 16 Dec 2022 16:44:57 -0800 Subject: [PATCH] Adds supports_dynamic_linker feature With this feature, cc_library generates a .so as well as a .a and the "dynamic_library" output group is enabled. --- toolchain/zig_toolchain.bzl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolchain/zig_toolchain.bzl b/toolchain/zig_toolchain.bzl index f76aa80..2578973 100644 --- a/toolchain/zig_toolchain.bzl +++ b/toolchain/zig_toolchain.bzl @@ -129,9 +129,15 @@ def _zig_cc_toolchain_config_impl(ctx): flag_sets = dynamic_library_flag_sets, ) + supports_dynamic_linker = feature( + name = "supports_dynamic_linker", + enabled = True, + ) + features = [ compile_and_link_flags, default_linker_flags, + supports_dynamic_linker, ] + _compilation_mode_features(ctx) return cc_common.create_cc_toolchain_config_info(