Skip to content

Commit a6e0b13

Browse files
jasukejcopybara-github
authored andcommitted
Change generated IR output (--ir-out) from JSON to textproto.
This CL also cleans up all JSON formatting and conversion code in the frontend. PiperOrigin-RevId: 951173343
1 parent ebaef63 commit a6e0b13

7 files changed

Lines changed: 45 additions & 977 deletions

File tree

rs_bindings_from_cc/BUILD

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@ cc_library(
8989
":generate_bindings_and_metadata",
9090
"//common:file_io",
9191
"//common:status_macros",
92+
"//third_party/protobuf",
9293
"@abseil-cpp//absl/flags:parse",
9394
"@abseil-cpp//absl/status",
9495
"@abseil-cpp//absl/strings",
9596
"@abseil-cpp//absl/strings:string_view",
9697
"@abseil-cpp//absl/types:span",
9798
"@llvm-project//llvm:Support",
9899
],
100+
alwayslink = 1,
99101
)
100102

101103
cc_library(
@@ -458,7 +460,6 @@ rust_library(
458460
],
459461
deps = [
460462
":ir",
461-
":json_from_cc",
462463
"//common:arc_anyhow",
463464
"//common:crubit_feature",
464465
"//common:ffi_types",
@@ -526,22 +527,6 @@ cc_library(
526527
],
527528
)
528529

529-
cc_library(
530-
name = "json_from_cc",
531-
testonly = 1,
532-
srcs = ["json_from_cc.cc"],
533-
deps = [
534-
":cc_ir",
535-
":ir_from_cc_dependency",
536-
"//common:cc_ffi_types",
537-
"@abseil-cpp//absl/container:flat_hash_set",
538-
"@abseil-cpp//absl/status:statusor",
539-
"@abseil-cpp//absl/strings:string_view",
540-
"@llvm-project//llvm:Support",
541-
],
542-
alwayslink = 1,
543-
)
544-
545530
cc_library(
546531
name = "proto_from_cc",
547532
testonly = 1,

rs_bindings_from_cc/cmdline.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ ABSL_FLAG(std::string, rs_out, "",
4040
ABSL_FLAG(std::string, cc_out, "",
4141
"output path for the C++ source file with bindings implementation");
4242
ABSL_FLAG(std::string, ir_out, "",
43-
"(optional) output path for the JSON IR. If not present, the JSON IR "
44-
"will not be dumped.");
43+
"(optional) output path for the textproto IR. If not present, the "
44+
"textproto IR will not be dumped.");
4545
ABSL_FLAG(std::string, crubit_support_path_format, "",
4646
"the format of `#include` for including Crubit C++ support library "
4747
"headers in the "

0 commit comments

Comments
 (0)