8000 Update on "switch aten_headers to use strip_include_prefix instead of… · pytorch/pytorch@fa4a98f · GitHub
[go: up one dir, main page]

Skip to content

Commit fa4a98f

Browse files
author
Michael Andreas Dagitses
committed
Update on "switch aten_headers to use strip_include_prefix instead of includes"
This is Bazel best practices and easier to maintain. Differential Revision: [D36521515](https://our.internmc.facebook.com/intern/diff/D36521515/) [ghstack-poisoned]
2 parents 09b61a1 + f77a4c9 commit fa4a98f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ header_template_rule(
215215

216216
cc_library(
217217
name = "aten_core_headers",
218-
hdrs = aten_core_hdrs(),
218+
hdrs = aten_core_hdrs(rules = rules),
219219
strip_include_prefix = "aten/src/",
220220
deps = ["//c10:headers"],
221221
)
@@ -233,7 +233,7 @@ cc_library(
233233
"aten/src/TH/**/*.cpp",
234234
"aten/src/THC/*.cuh",
235235
"aten/src/THC/generic/*.cu",
236-
], exclude = aten_core_hdrs()
236+
], exclude = aten_core_hdrs(rules = rules)
237237
) + [
238238
":aten_src_ATen_config",
239239
":gen_aten",

build.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ def define_targets(rules):
124124
tools = ["//tools/setup_helpers:gen_version_header"],
125125
)
126126

127-
def aten_core_hdrs():
127+
def aten_core_hdrs(rules):
128128
"""The source files that are part of the aten_core_headers target.
129129
130130
Note that this is a function because globs are not permitted at
131131
global scope in Starlark.
132132
"""
133-
return glob([
133+
return rules.glob([
134134
"aten/src/ATen/core/*.h",
135135
"aten/src/ATen/ops/*.h",
136136
"aten/src/ATen/core/boxing/*.h",

0 commit comments

Comments
 (0)
0