Skip to content

Commit e096fab

Browse files
committed
fix several compile library updates
1 parent 89057c8 commit e096fab

File tree

6 files changed

+86
-70
lines changed

6 files changed

+86
-70
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.2.1
1+
7.5.0

MODULE.bazel

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,24 @@
33
# Using bazel 7 or newer and pointing to https://registry.bazel.build/
44
#
55

6-
bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
6+
bazel_dep(name = "rules_cc", version = "0.1.1")
7+
bazel_dep(name = "rules_foreign_cc", version = "0.14.0")
8+
#bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
79

8-
#### M4/Flex/Bison
9-
bazel_dep(name = "rules_m4", version = "0.2.3")
10+
bazel_dep(name = "abseil-cpp", version = "20250127.0") # 20240722.0.bcr.2")
11+
bazel_dep(name = "google_benchmark", version = "1.9.1")
12+
bazel_dep(name = "googletest", version = "1.16.0")
13+
bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.1")
14+
bazel_dep(name = "rules_proto", version = "7.1.0")
15+
bazel_dep(name = "protobuf", version = "27.1")
1016

11-
bazel_dep(name = "rules_flex", version = "0.2.1")
17+
bazel_dep(name = "rules_m4", version = "0.2.4")
18+
bazel_dep(name = "rules_flex", version = "0.3.1")
19+
bazel_dep(name = "rules_bison", version = "0.3.1")
1220

13-
bazel_dep(name = "rules_bison", version = "0.2.2")
21+
bazel_dep(name = "rapidjson", version = "1.1.0.bcr.20241007")
1422

15-
# google benchmark
16-
bazel_dep(name = "google_benchmark", version = "1.8.5")
17-
18-
# rapidjson
19-
bazel_dep(name = "rapidjson", version = "1.1.0")
20-
21-
# mimalloc (only seems to work in Linux)
2223
bazel_dep(name = "mimalloc", version = "2.1.7-bcr.alpha.1")
2324

24-
# abseil
25-
bazel_dep(name = "abseil-cpp", version = "20240722.0")
25+
bazel_dep(name = "tree-sitter-bazel", version = "0.24.4", repo_name="tree-sitter")
2626

27-
# googletest
28-
bazel_dep(name = "googletest", version = "1.15.2")

WORKSPACE

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ workspace(name = "livehd")
44

55
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
66
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
7-
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
87

98
new_git_repository(
109
name = "abc",
@@ -73,15 +72,15 @@ http_archive(
7372
)
7473

7574
# tree sitter
76-
http_archive(
77-
name = "tree-sitter",
78-
build_file = "tree-sitter.BUILD",
79-
sha256 = "e9f2772b12d4b12a0db5542ce72e8c85a34e397f2c3fd7b3fa08814f71fd35b3",
80-
strip_prefix = "tree-sitter-0.23.0",
81-
urls = [
82-
"https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.23.0.zip",
83-
],
84-
)
75+
# http_archive(
76+
# name = "tree-sitter",
77+
# build_file = "tree-sitter.BUILD",
78+
# sha256 = "e9f2772b12d4b12a0db5542ce72e8c85a34e397f2c3fd7b3fa08814f71fd35b3",
79+
# strip_prefix = "tree-sitter-0.23.0",
80+
# urls = [
81+
# "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.23.0.zip",
82+
# ],
83+
# )
8584

8685
# nlohmann json
8786
http_archive(
@@ -107,10 +106,10 @@ http_archive(
107106
# HIF
108107
http_archive(
109108
name = "hif",
110-
sha256 = "bf4d0d5e06b100b616c35b8fc1601de482ea0dfc7b8f0f75763f9b9020076626",
111-
strip_prefix = "hif-11b5dc3eda963fe5220345dac7fa2ccc68545182",
109+
sha256 = "b8103f11e679ae8e3dd700f0c41ed4191aa819c215256066a8ff0e531cb77a63",
110+
strip_prefix = "hif-cf106676965e935aa2e46754e3e17a68a5367781",
112111
urls = [
113-
"https://github.com/masc-ucsc/hif/archive/11b5dc3eda963fe5220345dac7fa2ccc68545182.zip",
112+
"https://github.com/masc-ucsc/hif/archive/cf106676965e935aa2e46754e3e17a68a5367781.zip",
114113
],
115114
)
116115

@@ -197,24 +196,24 @@ http_archive(
197196
)
198197

199198
# Protobuf
200-
http_archive(
201-
name = "rules_proto_grpc",
202-
sha256 = "9ba7299c5eb6ec45b6b9a0ceb9916d0ab96789ac8218269322f0124c0c0d24e2",
203-
strip_prefix = "rules_proto_grpc-4.5.0",
204-
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.5.0/rules_proto_grpc-4.5.0.tar.gz"],
205-
)
206-
207-
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
208-
209-
rules_proto_grpc_toolchains()
210-
211-
rules_proto_grpc_repos()
212-
213-
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
214-
215-
rules_proto_dependencies()
199+
# http_archive(
200+
# name = "rules_proto_grpc",
201+
# sha256 = "9ba7299c5eb6ec45b6b9a0ceb9916d0ab96789ac8218269322f0124c0c0d24e2",
202+
# strip_prefix = "rules_proto_grpc-4.5.0",
203+
# urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.5.0/rules_proto_grpc-4.5.0.tar.gz"],
204+
# )
205+
#
206+
# load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
207+
#
208+
# rules_proto_grpc_toolchains()
209+
#
210+
# rules_proto_grpc_repos()
216211

217-
rules_proto_toolchains()
212+
# load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
213+
#
214+
# rules_proto_dependencies()
215+
#
216+
# rules_proto_toolchains()
218217
# http_archive(
219218
# name = "rules_proto",
220219
# sha256 = "fea00227e78467fc8ab6a17f7de26489b7dcb3b773659cf6d9906251e521cfe9",

benchmark/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ cc_binary(
99
copts = COPTS,
1010
deps = [
1111
"//core",
12-
"//inou/firrtl:inou_firrtl_cpp",
1312
"//lgraph",
1413
"//lnast",
1514
"//pass/lnast_tolg:pass_lnast_tolg",

benchmark/bm_format.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88

99
#include "benchmark/benchmark.h"
1010

11-
#include "core/lhtree.hpp"
11+
#include "lhtree.hpp"
1212
#include "eprp_var.hpp"
1313

14-
#include "lnast/lnast_writer.hpp"
15-
#include "lnast/lnast_parser.hpp"
16-
#include "lnast/lnast_hif_writer.hpp"
17-
#include "lnast/lnast_hif_reader.hpp"
14+
#include "lnast_writer.hpp"
15+
#include "lnast_parser.hpp"
16+
#include "lnast_hif_writer.hpp"
17+
#include "lnast_hif_reader.hpp"
1818

19-
#include "lgraph/lgraph.hpp"
20-
#include "pass/lnast_tolg/lnast_tolg.hpp"
21-
#include "inou/firrtl/inou_firrtl.hpp"
19+
#include "lgraph.hpp"
20+
#include "lnast_tolg.hpp"
2221

2322
class LnastTestFixture : public benchmark::Fixture {
2423
public:
@@ -85,15 +84,15 @@ BENCHMARK_F(LnastTestFixture, LN_LNAST)(benchmark::State& st) {
8584
}
8685
}
8786

87+
88+
/*
8889
BENCHMARK_F(LnastTestFixture, FIRRTL_LNAST)(benchmark::State& st) {
8990
for (auto _ : st) {
9091
Eprp_var var;
9192
var.add("files", "benchmark/firrtl/test.pb");
9293
Inou_firrtl::to_lnast(var);
9394
}
9495
}
95-
96-
/*
9796
BENCHMARK_F(LnastTestFixture, LNAST_FIRRTL)(benchmark::State& st) {
9897
Eprp_var var;
9998
var.add("files", "benchmark/firrtl/test.pb");

inou/firrtl/BUILD

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
1+
# load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
22
load("@rules_proto//proto:defs.bzl", "proto_library")
3+
load("@rules_proto_grpc_cpp//:defs.bzl", "cpp_proto_library")
4+
load("@rules_proto_grpc_cpp//:defs.bzl", "cpp_proto_compile")
5+
36
load("//tools:copt_default.bzl", "COPTS")
47

58
FIRRTL_TESTS = glob([
@@ -10,15 +13,10 @@ FIRRTL_TESTS = glob([
1013
proto_library(
1114
name = "firrtl_proto",
1215
srcs = ["firrtl.proto"],
13-
deps = ["@com_google_protobuf//:any_proto"],
14-
)
15-
16-
cc_proto_library(
17-
name = "firrtl_cc_proto",
18-
deps = [":firrtl_proto"],
16+
deps = ["@protobuf//:any_proto"],
1917
)
2018

21-
cc_library(
19+
cpp_proto_library(
2220
name = "inou_firrtl_cpp",
2321
srcs = [
2422
"find_circuit_comps.cpp",
@@ -27,15 +25,38 @@ cc_library(
2725
"inou_firrtl.hpp",
2826
"lnast_tofir.cpp",
2927
],
30-
hdrs = ["inou_firrtl.hpp"],
31-
copts = COPTS,
3228
includes = ["."],
29+
hdrs = ["inou_firrtl.hpp"],
30+
protos = [":firrtl_proto"],
3331
visibility = ["//visibility:public"],
3432
deps = [
35-
":firrtl_cc_proto",
3633
"//pass/common:pass",
3734
],
38-
alwayslink = True,
3935
)
4036

37+
# cc_proto_library(
38+
# name = "firrtl_cc_proto",
39+
# deps = [":firrtl_proto"],
40+
# )
41+
42+
# cc_library(
43+
# name = "inou_firrtl_cpp",
44+
# srcs = [
45+
# "find_circuit_comps.cpp",
46+
# "fir_tolnast.cpp",
47+
# "inou_firrtl.cpp",
48+
# "inou_firrtl.hpp",
49+
# "lnast_tofir.cpp",
50+
# ],
51+
# hdrs = ["inou_firrtl.hpp"],
52+
# copts = COPTS,
53+
# includes = ["."],
54+
# visibility = ["//visibility:public"],
55+
# deps = [
56+
# ":firrtl_lib_proto",
57+
# "//pass/common:pass",
58+
# ],
59+
# alwayslink = True,
60+
# )
61+
4162
exports_files(FIRRTL_TESTS + ["post_io_renaming.py"])

0 commit comments

Comments
 (0)