8000 switch aten_headers to use strip_include_prefix instead of includes · pytorch/pytorch@b9c3fd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9c3fd5

Browse files
author
Michael Andreas Dagitses
committed
switch aten_headers to use strip_include_prefix instead of includes
Pull Request resolved: #77865 This is Bazel best practices and easier to maintain. ghstack-source-id: 156812099 Differential Revision: [D36521515](https://our.internmc.facebook.com/intern/diff/D36521515/)
1 parent cc5803a commit b9c3fd5

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

BUILD.bazel

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,28 @@ cc_library(
238238
":aten_src_ATen_config",
239239
":gen_aten",
240240
],
241-
includes = [
242-
"aten/src",
243-
],
241+
strip_include_prefix = "aten/src/",
244242
deps = [
245243
":aten_core_headers",
244+
":torch_base_headers",
246245
"//c10:headers",
247246
],
248247
)
249248

249+
# Temporary library to enable us to use strip_include_prefix =
250+
# "aten/src/" in aten_headers above. Only use this in aten_headers.
251+
cc_library(
252+
name = "torch_base_headers",
253+
hdrs = [
254+
"torch/csrc/Export.h",
255+
"torch/csrc/jit/frontend/function_schema_parser.h",
256+
],
257+
deps = [
258+
"//c10/macros",
259+
"//c10/util:base",
260+
],
261+
)
262+
250263
ATEN_COPTS = COMMON_COPTS + [
251264
"-DCAFFE2_BUILD_MAIN_LIBS",
252265
"-DHAVE_AVX_CPU_DEFINITION",

0 commit comments

Comments
 (0)
0