diff --git a/third_party/BUILD b/third_party/BUILD new file mode 100644 index 0000000000..5e49df71a8 --- /dev/null +++ b/third_party/BUILD @@ -0,0 +1,37 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +load("@bazel_skylib//lib:selects.bzl", "selects") + +config_setting( + name = "ebclfsa", + constraint_values = [ + "@score_bazel_platforms//runtime_es:ebclfsa", + ], +) + +config_setting( + name = "autosd10", + constraint_values = [ + "@score_bazel_platforms//runtime_es:autosd10", + ], +) + +selects.config_setting_group( + name = "use_system_libs", + match_any = [ + ":ebclfsa", + ":autosd10", + ], + visibility = ["//:__subpackages__"], +) diff --git a/third_party/acl/BUILD b/third_party/acl/BUILD index fa7b7c013d..00bdb5da90 100644 --- a/third_party/acl/BUILD +++ b/third_party/acl/BUILD @@ -11,9 +11,18 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_cc//cc:defs.bzl", "cc_library") + +cc_library( + name = "acl_system", + linkopts = ["-lacl"], + visibility = ["//:__subpackages__"], +) + alias( name = "acl", actual = select({ + "//third_party:use_system_libs": ":acl_system", "@platforms//cpu:aarch64": "@acl-deb-aarch64//:acl", "//conditions:default": "@acl-deb//:acl", }), diff --git a/third_party/libcap2/BUILD b/third_party/libcap2/BUILD index 37016782a7..d227de6e24 100644 --- a/third_party/libcap2/BUILD +++ b/third_party/libcap2/BUILD @@ -11,9 +11,18 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_cc//cc:defs.bzl", "cc_library") + +cc_library( + name = "libcap2_system", + linkopts = ["-lcap"], + visibility = ["//:__subpackages__"], +) + alias( name = "libcap2", actual = select({ + "//third_party:use_system_libs": ":libcap2_system", "@platforms//cpu:aarch64": "@libcap2-dev-deb-aarch64//:libcap2", "//conditions:default": "@libcap2-dev-deb//:libcap2", }),