Skip to content

Commit caef31b

Browse files
yfeldblumfacebook-github-bot
authored andcommitted
move xplat build rules: folly/functional/
Reviewed By: dmm-fb Differential Revision: D77344445 fbshipit-source-id: 7b4185f2b45e75af03c5ffc4d4d69ac02c60a04b
1 parent c801ae9 commit caef31b

File tree

4 files changed

+150
-45
lines changed

4 files changed

+150
-45
lines changed

folly/BUCK

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,48 +1784,27 @@ non_fbcode_target(
17841784
)
17851785

17861786
non_fbcode_target(
1787+
# @shim
17871788
_kind = folly_xplat_library,
17881789
name = "functional_invoke",
17891790
feature = triage_InfrastructureSupermoduleOptou,
1790-
raw_headers = [
1791-
"functional/Invoke.h",
1792-
],
1793-
exported_deps = [
1794-
":cpp_attributes",
1795-
":portability",
1796-
":preprocessor",
1797-
":traits",
1798-
":utility",
1799-
"//third-party/boost:boost_preprocessor",
1800-
"//xplat/folly/lang:customization_point",
1801-
],
1791+
exported_deps = ["//xplat/folly/functional:invoke"],
18021792
)
18031793

18041794
non_fbcode_target(
1795+
# @shim
18051796
_kind = folly_xplat_library,
18061797
name = "functional_protocol",
18071798
feature = triage_InfrastructureSupermoduleOptou,
1808-
raw_headers = [
1809-
"functional/protocol.h",
1810-
],
1811-
exported_deps = [
1812-
":functional_invoke",
1813-
":functional_traits",
1814-
":portability",
1815-
":traits",
1816-
],
1799+
exported_deps = ["//xplat/folly/functional:protocol"],
18171800
)
18181801

18191802
non_fbcode_target(
1803+
# @shim
18201804
_kind = folly_xplat_library,
18211805
name = "functional_traits",
18221806
feature = triage_InfrastructureSupermoduleOptou,
1823-
raw_headers = [
1824-
"functional/traits.h",
1825-
],
1826-
exported_deps = [
1827-
":traits",
1828-
],
1807+
exported_deps = ["//xplat/folly/functional:traits"],
18291808
)
18301809

18311810
non_fbcode_target(
@@ -1848,30 +1827,19 @@ non_fbcode_target(
18481827
)
18491828

18501829
non_fbcode_target(
1830+
# @shim
18511831
_kind = folly_xplat_library,
18521832
name = "functional_apply_tuple",
18531833
feature = triage_InfrastructureSupermoduleOptou,
1854-
raw_headers = [
1855-
"functional/ApplyTuple.h",
1856-
],
1857-
exported_deps = [
1858-
":functional_invoke",
1859-
":traits",
1860-
":utility",
1861-
],
1834+
exported_deps = ["//xplat/folly/functional:apply_tuple"],
18621835
)
18631836

18641837
non_fbcode_target(
1838+
# @shim
18651839
_kind = folly_xplat_library,
18661840
name = "functional_partial",
18671841
feature = triage_InfrastructureSupermoduleOptou,
1868-
raw_headers = [
1869-
"functional/Partial.h",
1870-
],
1871-
exported_deps = [
1872-
":functional_invoke",
1873-
":utility",
1874-
],
1842+
exported_deps = ["//xplat/folly/functional:partial"],
18751843
)
18761844

18771845
non_fbcode_target(

folly/functional/BUCK

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,76 @@
1-
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
22
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
3+
load("@fbsource//xplat/folly:defs.bzl", "folly_xplat_library")
4+
load("@fbsource//xplat/pfh/triage_InfrastructureSupermoduleOptou:DEFS.bzl", "triage_InfrastructureSupermoduleOptou")
35

46
oncall("fbcode_entropy_wardens_folly")
57

8+
# xplat build rules
9+
10+
non_fbcode_target(
11+
_kind = folly_xplat_library,
12+
name = "apply_tuple",
13+
feature = triage_InfrastructureSupermoduleOptou,
14+
raw_headers = ["ApplyTuple.h"],
15+
exported_deps = [
16+
":invoke",
17+
"//xplat/folly:traits",
18+
"//xplat/folly:utility",
19+
],
20+
)
21+
22+
non_fbcode_target(
23+
_kind = folly_xplat_library,
24+
name = "invoke",
25+
feature = triage_InfrastructureSupermoduleOptou,
26+
raw_headers = ["Invoke.h"],
27+
exported_deps = [
28+
"//third-party/boost:boost_preprocessor",
29+
"//xplat/folly:cpp_attributes",
30+
"//xplat/folly:portability",
31+
"//xplat/folly:preprocessor",
32+
"//xplat/folly:traits",
33+
"//xplat/folly:utility",
34+
"//xplat/folly/lang:customization_point",
35+
],
36+
)
37+
38+
non_fbcode_target(
39+
_kind = folly_xplat_library,
40+
name = "partial",
41+
feature = triage_InfrastructureSupermoduleOptou,
42+
raw_headers = ["Partial.h"],
43+
exported_deps = [
44+
":invoke",
45+
"//xplat/folly:utility",
46+
],
47+
)
48+
49+
non_fbcode_target(
50+
_kind = folly_xplat_library,
51+
name = "protocol",
52+
feature = triage_InfrastructureSupermoduleOptou,
53+
raw_headers = ["protocol.h"],
54+
exported_deps = [
55+
":invoke",
56+
":traits",
57+
"//xplat/folly:portability",
58+
"//xplat/folly:traits",
59+
],
60+
)
61+
62+
non_fbcode_target(
63+
_kind = folly_xplat_library,
64+
name = "traits",
65+
feature = triage_InfrastructureSupermoduleOptou,
66+
raw_headers = ["traits.h"],
67+
exported_deps = [
68+
"//xplat/folly:traits",
69+
],
70+
)
71+
72+
# fbcode build rules
73+
674
fbcode_target(
775
_kind = cpp_library,
876
name = "apply_tuple",

folly/functional/test/BUCK

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,73 @@
1-
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
22
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
3+
load("@fbsource//xplat/folly:defs.bzl", "folly_xplat_cxx_test")
4+
load("@fbsource//xplat/pfh/triage_InfrastructureSupermoduleOptou:DEFS.bzl", "triage_InfrastructureSupermoduleOptou")
35

46
oncall("fbcode_entropy_wardens_folly")
57

8+
# xplat unit tests
9+
10+
non_fbcode_target(
11+
_kind = folly_xplat_cxx_test,
12+
name = "apply_tuple_test",
13+
srcs = ["ApplyTupleTest.cpp"],
14+
feature = triage_InfrastructureSupermoduleOptou,
15+
deps = [
16+
"//xplat/folly:overload",
17+
"//xplat/folly:portability_gtest",
18+
"//xplat/folly/functional:apply_tuple",
19+
],
20+
)
21+
22+
non_fbcode_target(
23+
_kind = folly_xplat_cxx_test,
24+
name = "invoke_test",
25+
srcs = ["InvokeTest.cpp"],
26+
feature = triage_InfrastructureSupermoduleOptou,
27+
deps = [
28+
"//xplat/folly:cpp_attributes",
29+
"//xplat/folly:portability_gtest",
30+
"//xplat/folly/functional:invoke",
31+
],
32+
)
33+
34+
non_fbcode_target(
35+
_kind = folly_xplat_cxx_test,
36+
name = "partial_test",
37+
srcs = ["PartialTest.cpp"],
38+
feature = triage_InfrastructureSupermoduleOptou,
39+
deps = [
40+
"//xplat/folly:function",
41+
"//xplat/folly:portability_gtest",
42+
"//xplat/folly/functional:partial",
43+
],
44+
)
45+
46+
non_fbcode_target(
47+
_kind = folly_xplat_cxx_test,
48+
name = "protocol_test",
49+
srcs = ["protocol_test.cpp"],
50+
feature = triage_InfrastructureSupermoduleOptou,
51+
deps = [
52+
"//xplat/folly:portability_gtest",
53+
"//xplat/folly:traits",
54+
"//xplat/folly/functional:protocol",
55+
],
56+
)
57+
58+
non_fbcode_target(
59+
_kind = folly_xplat_cxx_test,
60+
name = "traits_test",
61+
srcs = ["traits_test.cpp"],
62+
feature = triage_InfrastructureSupermoduleOptou,
63+
deps = [
64+
"//xplat/folly:portability_gtest",
65+
"//xplat/folly/functional:traits",
66+
],
67+
)
68+
69+
# fbcode unit tests
70+
671
fbcode_target(
772
_kind = cpp_unittest,
873
name = "apply_tuple_test",

folly/somerge_defs.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
Generated by xplat/cross_plat_devx/somerge_maps/compute_merge_maps.py
44
5-
@generated SignedSource<<5ece455ac8430b3b464e49e6570b9f18>>
5+
@generated SignedSource<<0089029841c077f6c298964d37265b74>>
66
"""
77

88
# Entry Points:
@@ -27,6 +27,9 @@ FOLLY_NATIVE_LIBRARY_MERGE_MAP = [
2727
"fbsource//xplat/folly/detail:sseAndroid",
2828
"fbsource//xplat/folly/experimental/coro:coroutineAndroid",
2929
"fbsource//xplat/folly/external/nvidia/detail:range_sve2Android",
30+
"fbsource//xplat/folly/functional:apply_tupleAndroid",
31+
"fbsource//xplat/folly/functional:invokeAndroid",
32+
"fbsource//xplat/folly/functional:partialAndroid",
3033
"fbsource//xplat/folly/lang:alignAndroid",
3134
"fbsource//xplat/folly/lang:assumeAndroid",
3235
"fbsource//xplat/folly/lang:bitsAndroid",
@@ -186,6 +189,7 @@ FOLLY_BASE_NATIVE_LIBRARY_MERGE_MAP = [
186189
"fbsource//xplat/folly/fibers:guard_page_allocatorAndroid",
187190
"fbsource//xplat/folly/fibers:loop_controllerAndroid",
188191
"fbsource//xplat/folly/fibers:traitsAndroid",
192+
"fbsource//xplat/folly/functional:traitsAndroid",
189193
"fbsource//xplat/folly/io/async/ssl:tls_definitionsAndroid",
190194
"fbsource//xplat/folly/io/async:async_baseAndroid",
191195
"fbsource//xplat/folly/io/async:async_base_fwdAndroid",

0 commit comments

Comments
 (0)