From 2d587663eeb0c5152994050fd3621b7093c6bc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurenz=20Altenm=C3=BCller?= Date: Fri, 14 Mar 2025 11:02:38 +0100 Subject: [PATCH] iox-#2434: Remove `--//:feature_acl=auto` --- .bazelrc | 6 +++--- BUILD.bazel | 7 +++---- iceoryx_platform/BUILD.bazel | 37 +----------------------------------- 3 files changed, 7 insertions(+), 43 deletions(-) diff --git a/.bazelrc b/.bazelrc index 08fd10222d..ff0756cf69 100644 --- a/.bazelrc +++ b/.bazelrc @@ -45,6 +45,6 @@ build --noenable_bzlmod # feature flags # -# value [auto, on, off] -# 'auto' is platform dependent ('on' on Linux and QNX, 'off' on other OS) and the default value if the flag is not set -#build --//:feature_acl=off +# value [True, False]. Default: False. +# Here we turn on the setting for Linux in this repo. Downstream consumers are unaffected. +build:linux --//:feature_acl=True diff --git a/BUILD.bazel b/BUILD.bazel index 3955fa5006..1b61d1b014 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -14,17 +14,16 @@ # # SPDX-License-Identifier: Apache-2.0 -load("@bazel_skylib//rules:common_settings.bzl", "string_flag") +load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") load("@buildifier_prebuilt//:rules.bzl", "buildifier") exports_files(["LICENSE"]) exports_files(["VERSION"]) -# values: auto, on, off -string_flag( +bool_flag( name = "feature_acl", - build_setting_default = "auto", + build_setting_default = False, visibility = ["//visibility:public"], ) diff --git a/iceoryx_platform/BUILD.bazel b/iceoryx_platform/BUILD.bazel index d7e66aff92..3d9bffa388 100644 --- a/iceoryx_platform/BUILD.bazel +++ b/iceoryx_platform/BUILD.bazel @@ -14,7 +14,6 @@ # # SPDX-License-Identifier: Apache-2.0 -load("@bazel_skylib//lib:selects.bzl", "selects") load("@rules_cc//cc:defs.bzl", "cc_library") load("//bazel:configure_file.bzl", "configure_file") load("//bazel:configure_version.bzl", "configure_version") @@ -67,42 +66,8 @@ configure_version( ) config_setting( - name = "acl_auto", - flag_values = { - "//:feature_acl": "auto", - }, -) - -config_setting( - name = "acl_enabled", - flag_values = { - "//:feature_acl": "on", - }, -) - -selects.config_setting_group( - name = "acl_linux_enabled", - match_all = [ - ":linux", - ":acl_auto", - ], -) - -selects.config_setting_group( - name = "acl_qnx_enabled", - match_all = [ - ":qnx", - ":acl_auto", - ], -) - -selects.config_setting_group( name = "cfg_feature_acl", - match_any = [ - ":acl_enabled", - ":acl_linux_enabled", - ":acl_qnx_enabled", - ], + flag_values = {"//:feature_acl": "True"}, ) configure_file(