From f557402e8d69c6007236d14e41a3bb8b65307fe4 Mon Sep 17 00:00:00 2001 From: mikey dagitses Date: Wed, 5 Apr 2023 09:16:05 -0700 Subject: [PATCH] remove //c10:headers (#98420) The c10 library is light enough that there's not really much benefit to being very unbazel-y and providing an incomplete library that lacks the source files. Differential Revision: [D44713077](https://our.internmc.facebook.com/intern/diff/D44713077/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/98420 Approved by: https://github.com/ezyang --- BUILD.bazel | 8 ++++---- c10/BUILD.bazel | 22 ---------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 0e3866c78c34..aa282cdab306 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -314,7 +314,7 @@ cc_library( "aten/src", ], deps = [ - "//c10:headers", + "//c10", ], ) @@ -383,7 +383,7 @@ cc_library( visibility = ["//visibility:public"], deps = [ ":aten_headers", - "//c10:headers", + "//c10", "@cuda", "@cuda//:cuda_driver", "@cuda//:nvrtc", @@ -1262,7 +1262,7 @@ cc_library( visibility = ["//visibility:public"], deps = [ ":caffe2_core_macros", - "//c10:headers", + "//c10", "//caffe2/proto:caffe2_pb", ], ) @@ -1579,7 +1579,7 @@ cc_library( deps = [ ":aten_headers", ":caffe2_headers", - "//c10:headers", + "//c10", "@com_github_google_flatbuffers//:flatbuffers", "@local_config_python//:python_headers", "@onnx", diff --git a/c10/BUILD.bazel b/c10/BUILD.bazel index 3504451fc8df..aadcf5ee3e55 100644 --- a/c10/BUILD.bazel +++ b/c10/BUILD.bazel @@ -28,25 +28,3 @@ config_setting( name = "using_glog", flag_values = {":use_glog": "true"}, ) - -cc_library( - name = "headers", - hdrs = [ - "//c10/core:headers", - "//c10/cuda:headers", - "//c10/mobile:headers", - "//c10/util:headers", - ], - deps = [ - "//c10/core:alignment", - "//c10/cuda:Macros", - "//c10/macros:macros", - ] + select({ - ":using_gflags": ["@com_github_gflags_gflags//:gflags"], - "//conditions:default": [], - }) + select({ - ":using_glog": ["@com_github_glog//:glog"], - "//conditions:default": [], - }), - visibility = ["//visibility:public"], -)