From 5654fed23e7728eca717b23c97c1fca8c176112a Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Fri, 18 Nov 2022 10:51:07 +0000 Subject: [PATCH] Export c10/[macros|util] headers to be used by internal inductor builds (#89249) Summary: Fixes package boundary violation that existed in previous implementation Test Plan: CI Differential Revision: D41391862 Pull Request resolved: https://github.com/pytorch/pytorch/pull/89249 Approved by: https://github.com/izaitsevfb --- c10/macros/build.bzl | 9 +++++++++ c10/util/build.bzl | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/c10/macros/build.bzl b/c10/macros/build.bzl index 932d0cabac4c..50f283560d7e 100644 --- a/c10/macros/build.bzl +++ b/c10/macros/build.bzl @@ -29,3 +29,12 @@ def define_targets(rules): "//conditions:default": [], }), ) + rules.filegroup( + name = "headers", + srcs = rules.glob( + ["*.h"], + exclude = [ + ], + ), + visibility = ["//:__pkg__"], + ) diff --git a/c10/util/build.bzl b/c10/util/build.bzl index b981eba67718..8d79a557477f 100644 --- a/c10/util/build.bzl +++ b/c10/util/build.bzl @@ -68,5 +68,5 @@ def define_targets(rules): exclude = [ ], ), - visibility = ["//c10:__pkg__"], + visibility = ["//c10:__pkg__", "//:__pkg__"], )