[pytorch] redirect fbcode//caffe2/c10:c10 to the OSS/conda version (#169004)

Summary: Some build rules want to consume c10 from an external source. Convert it to an alias (like other pytorch entry points), and redirect conda builds to use the `fbcode//conda/buck_integration/toolchains/third-party:torch-cpp` target.

Test Plan: CI.

Reviewed By: athmasagar

Differential Revision: D81518888

Pull Request resolved: https://github.com/pytorch/pytorch/pull/169004
Approved by: https://github.com/malfet
This commit is contained in:
Jeremy Braun
2025-12-10 17:59:51 +00:00
committed by PyTorch MergeBot
parent 2c109a65f8
commit f795b99ab2

View File

@@ -1,6 +1,6 @@
def define_targets(rules): def define_targets(rules, c10_name = "c10"):
rules.cc_library( rules.cc_library(
name = "c10", name = c10_name,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//c10/core:CPUAllocator", "//c10/core:CPUAllocator",
@@ -24,7 +24,7 @@ def define_targets(rules):
) )
rules.cc_library( rules.cc_library(
name = "c10_headers", name = c10_name + "_headers",
deps = [ deps = [
"//c10/core:base_headers", "//c10/core:base_headers",
"//c10/macros", "//c10/macros",