packages feed

cabal-buck2-0.6.0.0: buck2/prelude/decls/uncategorized_rules.bzl

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is dual-licensed under either the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree or the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree. You may select, at your option, one of the
# above-listed licenses.

# TODO(cjhopman): This was generated by scripts/hacks/rules_shim_with_docs.py,
# but should be manually edited going forward. There may be some errors in
# the generated docs, and so those should be verified to be accurate and
# well-formatted (and then delete this TODO)

load(":common.bzl", "buck", "prelude_rule")

NdkCxxRuntime = ["system", "gabixx", "stlport", "gnustl", "libcxx"]

legacy_toolchain = prelude_rule(
    name = "legacy_toolchain",
    docs = "",
    examples = None,
    further = None,
    attrs = (
        # @unsorted-dict-items
        {
            "toolchain_name": attrs.string(default = ""),
        }
        | buck.licenses_arg()
        | buck.labels_arg()
        | buck.contacts_arg()
    ),
)

ndk_toolchain = prelude_rule(
    name = "ndk_toolchain",
    docs = "",
    examples = None,
    further = None,
    attrs = (
        # @unsorted-dict-items
        {
            "cxx_runtime": attrs.option(attrs.enum(NdkCxxRuntime), default = None),
            "cxx_toolchain": attrs.dep(),
            "objdump": attrs.source(),
            "shared_runtime_path": attrs.option(attrs.source(), default = None),
            "strip_apk_libs_flags": attrs.option(attrs.list(attrs.arg()), default = None),
        }
        | buck.licenses_arg()
        | buck.labels_arg()
        | buck.contacts_arg()
    ),
)

uncategorized_rules = struct(
    legacy_toolchain = legacy_toolchain,
    ndk_toolchain = ndk_toolchain,
)