Skip to content

Commit

Permalink
Use abs from utils instead of the global
Browse files Browse the repository at this point in the history
Fixes #3068
  • Loading branch information
avdv committed Dec 10, 2024
1 parent c07cb1b commit 346510c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cargo/private/cargo_utils.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Utility functions for the cargo rules"""

load("//rust/platform:triple_mappings.bzl", "system_to_binary_ext")
load("//rust/private:utils.bzl", "abs")

def _resolve_repository_template(
*,
Expand Down
2 changes: 1 addition & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ load(
"make_static_lib_symlink",
"relativize",
)
load(":utils.bzl", "is_std_dylib")
load(":utils.bzl", "abs", "is_std_dylib")

# This feature is disabled unless one of the dependencies is a cc_library.
# Authors of C++ toolchains can place linker flags that should only be applied
Expand Down
1 change: 1 addition & 0 deletions rust/private/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def get_lib_name_for_windows(lib):

return libname

# TODO: remove after dropping support for Bazel < 7 when `abs` is a global
def abs(value):
"""Returns the absolute value of a number.
Expand Down
1 change: 1 addition & 0 deletions rust/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("//rust/platform:triple.bzl", "get_host_triple", "triple")
load("//rust/platform:triple_mappings.bzl", "triple_to_constraint_set")
load("//rust/private:common.bzl", "rust_common")
load("//rust/private:utils.bzl", "abs")
load(
"//rust/private:repository_utils.bzl",
"BUILD_for_rust_analyzer_proc_macro_srv",
Expand Down

0 comments on commit 346510c

Please sign in to comment.