Skip to content

Commit a8aae8d

Browse files
David Tolnayfacebook-github-bot
authored andcommitted
Relocate rust_linkable_symbol from fbcode_macros to fbsource
Summary: Just like the previous migration {D81048274} affecting `rust_library` and `rust_binary` and `rust_unittest`, this time for `rust_linkable_symbol`. It used to make sense to have `rust_linkable_symbol` inside fbcode_macros's build_defs because it used fbcode_macros's rust_library. Now that fbcode_macros no longer has its own `rust_library` and there is one unified `rust_library` for fbsource in fbsource's build_defs, `rust_linkable_symbol` should be there too. Reviewed By: JakobDegen Differential Revision: D81541808 fbshipit-source-id: c68a8aabecfed543d834febca36d68fee6618497
1 parent 4f9e0f2 commit a8aae8d

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

shim/build_defs/rust_linkable_symbol.bzl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66
# of this source tree. You may select, at your option, one of the
77
# above-listed licenses.
88

9-
load("@prelude//rust:linkable_symbol.bzl", prelude_rust_linkable_symbol = "rust_linkable_symbol")
10-
load("@shim//:shims.bzl", _rust_library = "rust_library")
9+
load("@fbsource//tools/build_defs:rust_linkable_symbol.bzl", _rust_linkable_symbol = "rust_linkable_symbol")
1110

12-
def rust_linkable_symbol(
13-
visibility = ["PUBLIC"],
14-
**kwargs):
15-
prelude_rust_linkable_symbol(
16-
visibility = visibility,
17-
rust_library_macro = _rust_library,
18-
**kwargs
19-
)
11+
rust_linkable_symbol = _rust_linkable_symbol
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# This source code is dual-licensed under either the MIT license found in the
4+
# LICENSE-MIT file in the root directory of this source tree or the Apache
5+
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6+
# of this source tree. You may select, at your option, one of the
7+
# above-listed licenses.
8+
9+
load("@prelude//rust:linkable_symbol.bzl", prelude_rust_linkable_symbol = "rust_linkable_symbol")
10+
load("@shim//:shims.bzl", _rust_library = "rust_library")
11+
12+
def rust_linkable_symbol(
13+
visibility = ["PUBLIC"],
14+
**kwargs):
15+
prelude_rust_linkable_symbol(
16+
visibility = visibility,
17+
rust_library_macro = _rust_library,
18+
**kwargs
19+
)

0 commit comments

Comments
 (0)