diff --git a/buckbuild.bzl b/buckbuild.bzl index 17153b5df77..65141ac9b5a 100644 --- a/buckbuild.bzl +++ b/buckbuild.bzl @@ -997,6 +997,7 @@ def define_buck_targets( "Config.h": ":generate_aten_config[Config.h]", }, labels = labels, + visibility = ["PUBLIC"], ) fb_xplat_cxx_library( diff --git a/c10/build.bzl b/c10/build.bzl index d4192a46852..6ecae511223 100644 --- a/c10/build.bzl +++ b/c10/build.bzl @@ -22,3 +22,15 @@ def define_targets(rules): [], ), ) + + rules.cc_library( + name = "c10_headers", + deps = [ + "//c10/core:base_headers", + "//c10/macros", + "//c10/util:base_headers", + "//c10/util:bit_cast", + "//c10/util:ssize", + ], + visibility = ["//visibility:public"], + ) diff --git a/c10/core/build.bzl b/c10/core/build.bzl index 45fc5ea3390..fe9a31a2da4 100644 --- a/c10/core/build.bzl +++ b/c10/core/build.bzl @@ -90,6 +90,22 @@ def define_targets(rules): alwayslink = True, ) + rules.cc_library( + name = "base_headers", + srcs = [], + hdrs = rules.glob( + [ + "*.h", + "impl/*.h", + ], + exclude = [ + "CPUAllocator.h", + "impl/alloc_cpu.h", + ], + ), + visibility = ["//visibility:public"], + ) + rules.filegroup( name = "headers", srcs = rules.glob( @@ -101,5 +117,5 @@ def define_targets(rules): "alignment.h", ], ), - visibility = ["//c10:__pkg__"], + visibility = ["//visibility:public"], ) diff --git a/c10/util/build.bzl b/c10/util/build.bzl index a6f95ae7516..5e1dc6fbfbf 100644 --- a/c10/util/build.bzl +++ b/c10/util/build.bzl @@ -80,6 +80,18 @@ def define_targets(rules): ], ) + rules.cc_library( + name = "base_headers", + hdrs = rules.glob( + ["*.h"], + exclude = [ + "bit_cast.h", + "ssize.h", + ], + ), + visibility = ["//visibility:public"], + ) + rules.filegroup( name = "headers", srcs = rules.glob(