Skip to content

Commit

Permalink
Do not use path helpers from cc_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jul 5, 2024
1 parent 1dd64b4 commit 54957f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,4 @@ cc_helper = struct(
tokenize = _tokenize,
should_use_pic = _should_use_pic,
check_cpp_modules = _check_cpp_modules,
get_base_name = _get_base_name,
replace_name = _replace_name,
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ load(":common/cc/cc_common.bzl", "cc_common")
load(":common/cc/cc_helper.bzl", "artifact_category", "cc_helper")
load(":common/cc/cc_info.bzl", "CcInfo")
load(":common/cc/semantics.bzl", "semantics")
load(":common/paths.bzl", "paths")

cc_internal = _builtins.internal.cc_internal

def _declare_static_library(*, name, actions, cc_toolchain):
new_name = cc_internal.get_artifact_name_for_category(
basename = paths.basename(name)
new_basename = cc_internal.get_artifact_name_for_category(
cc_toolchain = cc_toolchain,
category = artifact_category.STATIC_LIBRARY,
output_name = cc_helper.get_base_name(name),
output_name = basename,
)
return actions.declare_file(cc_helper.replace_name(name, new_name))
return actions.declare_file(name.removesuffix(basename) + new_basename)

def _collect_linker_inputs(deps):
transitive_linker_inputs = [dep[CcInfo].linking_context.linker_inputs for dep in deps]
Expand Down

0 comments on commit 54957f9

Please sign in to comment.