代码拉取完成,页面将自动刷新
# 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.
load("@prelude//cfg/modifier:cfg_constructor.bzl", "cfg_constructor_post_constraint_analysis", "cfg_constructor_pre_constraint_analysis")
load("@prelude//cfg/modifier:common.bzl", "MODIFIER_METADATA_KEY")
SHIM_ALIASES = {
"fedora": "shim//os/linux/distro/constraints:fedora",
"ubuntu": "shim//os/linux/distro/constraints:ubuntu",
}
def set_cfg_constructor(aliases = dict()):
project_root_cell = read_root_config("cell_aliases", "root")
current_root_cell = read_config("cell_aliases", "root")
if project_root_cell == current_root_cell:
native.set_cfg_constructor(
stage0 = cfg_constructor_pre_constraint_analysis,
stage1 = cfg_constructor_post_constraint_analysis,
key = MODIFIER_METADATA_KEY,
aliases = struct(**aliases),
extra_data = struct(),
)
def get_shim_modifiers():
modifiers = []
linux_distro = read_config("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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。