diff --git a/shim/build_defs/rust_linkable_symbol.bzl b/shim/build_defs/rust_linkable_symbol.bzl new file mode 100644 index 000000000..c29faa396 --- /dev/null +++ b/shim/build_defs/rust_linkable_symbol.bzl @@ -0,0 +1,18 @@ +# 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//rust:linkable_symbol.bzl", prelude_rust_linkable_symbol = "rust_linkable_symbol") +load("@shim//:shims.bzl", _rust_library = "rust_library") + +def rust_linkable_symbol( + visibility = ["PUBLIC"], + **kwargs): + prelude_rust_linkable_symbol( + visibility = visibility, + rust_library_macro = _rust_library, + **kwargs + ) diff --git a/shim/shims.bzl b/shim/shims.bzl index f48e8583c..d96a9dba2 100644 --- a/shim/shims.bzl +++ b/shim/shims.bzl @@ -451,6 +451,8 @@ def _fix_dep(x: str) -> [ return "root//" + x.removeprefix("//") elif x.startswith("shim//"): return x + elif x.startswith("prelude//"): + return x else: fail("Dependency is unaccounted for `{}`.\n".format(x) + "Did you forget 'oss-disable'?")