mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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
29 lines
765 B
Python
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__"],
|
|
)
|