Files
pytorch/c10/macros/build.bzl
Jane Xu 30587195d3 Migrate c10/macros/cmake_macros.h.in to torch/headeronly (#158035)
Summary: As above, also changes a bunch of the build files to be better

Test Plan:
internal and external CI

did run buck2 build fbcode//caffe2:torch and it succeeded

Rollback Plan:

Reviewed By: swolchok

Differential Revision: D78016591

Pull Request resolved: https://github.com/pytorch/pytorch/pull/158035
Approved by: https://github.com/swolchok
2025-07-15 19:52:59 +00:00

29 lines
765 B
Python

def define_targets(rules):
rules.cc_library(
name = "macros",
hdrs = [
"Macros.h",
# Despite the documentation in Macros.h, Export.h is included
# directly by many downstream files. Thus, we declare it as a
# public header in this file.
"Export.h",
"cmake_macros.h",
],
linkstatic = True,
local_defines = ["C10_BUILD_MAIN_LIB"],
visibility = ["//visibility:public"],
deps = [
"//torch/headeronly:torch_headeronly",
],
)
rules.filegroup(
name = "headers",
srcs = rules.glob(
["*.h"],
exclude = [
],
),
visibility = ["//:__pkg__"],
)