@@ -50,7 +50,6 @@ cc_toolchain_config(
5050 cxx_binary = "@{tc_pkg_repo}//:cxx",
5151 gcov_binary = "@{tc_pkg_repo}//:gcov",
5252 strip_binary = "@{tc_pkg_repo}//:strip",
53- ld_library_path_dirs = "@{tc_pkg_repo}//:ld_library_paths",
5453 sysroot = "@{tc_pkg_repo}//:sysroot_dir",
5554 target_cpu = "{tc_cpu}",
5655 target_os = "{tc_os}",
@@ -157,8 +156,11 @@ def _impl(rctx):
157156 extra_c_compile_flags = get_flag_groups (replace_placeholder (rctx .attr .extra_c_compile_flags ))
158157 extra_cxx_compile_flags = get_flag_groups (replace_placeholder (rctx .attr .extra_cxx_compile_flags ))
159158 extra_link_flags = get_flag_groups (replace_placeholder (rctx .attr .extra_link_flags ))
159+ compiler_library_search_paths = replace_placeholder (rctx .attr .tc_compiler_library_search_paths )
160160
161161 template_dict = {
162+ "%{compiler_library_search_paths_switch}" : "True" if len (rctx .attr .tc_compiler_library_search_paths ) else "False" ,
163+ "%{compiler_library_search_paths}" : ":" .join (["/proc/self/cwd/" + entry for entry in compiler_library_search_paths ]),
162164 "%{extra_c_compile_flags_switch}" : "True" if len (rctx .attr .extra_c_compile_flags ) else "False" ,
163165 "%{extra_c_compile_flags}" : extra_c_compile_flags ,
164166 "%{extra_compile_flags_switch}" : "True" if len (rctx .attr .extra_compile_flags ) else "False" ,
@@ -230,6 +232,7 @@ gcc_toolchain = repository_rule(
230232 "license_path" : attr .string (doc = "Lincese path" ),
231233 "sdk_version" : attr .string (doc = "SDK version string" ),
232234 "sdp_version" : attr .string (doc = "SDP version string" ),
235+ "tc_compiler_library_search_paths" : attr .string_list (doc = "Additional search path which compiler needs." ),
233236 "tc_cpu" : attr .string (doc = "Target platform CPU." ),
234237 "tc_identifier" : attr .string (doc = "Constraint to be used for toolchain definition (e.g. gcc_12.2.0)." ),
235238 "tc_os" : attr .string (doc = "Target platform OS." ),
0 commit comments