Skip to content

Commit

Permalink
Move //xplat/caffe2:caffe2_serialize to shared build structure
Browse files Browse the repository at this point in the history
Summary: This is a first step to migrate xplat targets to shared build structure. Eventually both xplat buck and open source bazel targets will be generated from shared build.bzl.

Test Plan: Should be no-op, rely on CI.

Reviewed By: malfet

Differential Revision: D35270004

Pull Request resolved: pytorch#75847
Approved by: https://github.com/linbinyu
  • Loading branch information
kit1980 authored and pytorchmergebot committed Apr 15, 2022
1 parent 3467f3f commit a5b4839
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions build.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
def define_targets(rules):
rules.cc_library(
name = "caffe2_serialize",
srcs = [
"caffe2/serialize/file_adapter.cc",
"caffe2/serialize/inline_container.cc",
"caffe2/serialize/istream_adapter.cc",
"caffe2/serialize/read_adapter_interface.cc",
],
# Flags that end with '()' are converted to a list of strings
# by calling the function when translating in to buck/bazel.
# TODO: find a better way to do this.
copts = ["get_c2_fbandroid_xplat_compiler_flags()", "-frtti"],
tags = [
"supermodule:android/default/pytorch",
"supermodule:ios/default/public.pytorch",
],
visibility = ["//visibility:public"],
deps = [
":caffe2_headers",
":miniz",
"//third-party/glog:glog",
"//xplat/caffe2/c10:c10",
],
)

0 comments on commit a5b4839

Please sign in to comment.