diff --git a/shim/cfg.bzl b/shim/cfg.bzl index 1e007498afe..9c630dfa062 100644 --- a/shim/cfg.bzl +++ b/shim/cfg.bzl @@ -31,9 +31,11 @@ def get_shim_modifiers(): modifiers = [] linux_distro = read_config("linux", "distro") - pprint(linux_distro) if linux_distro: modifiers.append("shim//os/linux/distro/constraints:{}".format(linux_distro)) + known_broken = read_config("oss", "known_broken", "disable") + modifiers.append("shim//opensource/macros/broken_in_oss/constraints:{}".format(known_broken)) + return modifiers diff --git a/shim/opensource/macros/BUCK b/shim/opensource/macros/BUCK new file mode 100644 index 00000000000..4e4acfd2090 --- /dev/null +++ b/shim/opensource/macros/BUCK @@ -0,0 +1,14 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +config_setting( + name = "broken-in-oss", + constraint_values = [ + "//opensource/macros/broken_in_oss/constraints:enable", + ], + visibility = ["PUBLIC"], +) diff --git a/shim/opensource/macros/broken_in_oss/constraints/BUCK b/shim/opensource/macros/broken_in_oss/constraints/BUCK new file mode 100644 index 00000000000..c49f2e67cf6 --- /dev/null +++ b/shim/opensource/macros/broken_in_oss/constraints/BUCK @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +constraint_setting( + name = "broken_in_oss", + visibility = ["PUBLIC"], +) + +constraint_value( + name = "enable", + constraint_setting = ":broken_in_oss", + visibility = ["PUBLIC"], +) + +constraint_value( + name = "disable", + constraint_setting = ":broken_in_oss", + visibility = ["PUBLIC"], +)