Skip to content

Commit 3f8f484

Browse files
committed
bazel: move MODULE.bazel to root of git repository
This is idiomatic for Bazel and fixes problems with e.g. git_override() Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 38f93c6 commit 3f8f484

File tree

15 files changed

+38
-27
lines changed

15 files changed

+38
-27
lines changed

.bazelignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tools/
2+
dependencies/
3+
docker/
4+
etc/
5+
jenkins/
6+
docs/
7+
8+
File renamed without changes.
File renamed without changes.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ build
9797

9898
# autotuner artifacts
9999
metadata-base-at.json
100+
101+
user.bazelrc
102+
bazel-*

flow/MODULE.bazel renamed to MODULE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
2727
pip.parse(
2828
hub_name = "orfs-pip",
2929
python_version = "3.12",
30-
requirements_lock = "//:util/requirements_lock.txt",
30+
requirements_lock = "//flow:util/requirements_lock.txt",
3131
)
3232
use_repo(pip, "orfs-pip")
3333

@@ -46,7 +46,7 @@ filegroup(
4646
visibility = ["//visibility:public"],
4747
)
4848
""",
49-
path = "../tools/OpenROAD/bazel-out/k8-opt/bin",
49+
path = "tools/OpenROAD/bazel-out/k8-opt/bin",
5050
)
5151

5252
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
@@ -63,8 +63,8 @@ orfs.default(
6363
# Official image https://hub.docker.com/r/openroad/orfs/tags
6464
image = "docker.io/openroad/orfs:v3.0-2883-ge22e4fc7",
6565
# Use local files instead of docker image
66-
makefile = "//:makefile",
67-
makefile_yosys = "//:makefile_yosys",
66+
makefile = "//flow:makefile",
67+
makefile_yosys = "//flow:makefile_yosys",
6868
# TODO once openroad is switched to MODULE.bazel, use
6969
# local_path_override(module_name = "openroad", path = "../tools/OpenROAD")
7070
# to point to the local openroad Bazel module instead of
@@ -77,8 +77,8 @@ orfs.default(
7777
#
7878
# cd ../tools/OpenROAD
7979
# bazelisk build -c opt :openroad
80-
openroad = "//test:openroad",
81-
pdk = "//:asap7",
80+
openroad = "//flow/test:openroad",
81+
pdk = "//flow:asap7",
8282
sha256 = "6ad0b1b7fbf290f33f0050ead4da181c83c6e8a9337b65f5f9cff65d67788424",
8383
)
8484
use_repo(orfs, "com_github_nixos_patchelf_download")

flow/MODULE.bazel.lock renamed to MODULE.bazel.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

flow/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ filegroup(
1818
"scripts/synth*.tcl",
1919
"platforms/common/**/*.v",
2020
]) + [
21-
"//util:makefile_yosys",
21+
"//flow/util:makefile_yosys",
2222
],
2323
visibility = ["//visibility:public"],
2424
)
@@ -31,7 +31,7 @@ filegroup(
3131
"scripts/*.tcl",
3232
"platforms/common/**/*.v",
3333
]) + [
34-
"//util:makefile",
34+
"//flow/util:makefile",
3535
],
3636
visibility = ["//visibility:public"],
3737
)

flow/designs/asap7/aes/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BLACKBOXES = [
1515
data = [":constraint.sdc"],
1616
module_top = name,
1717
variant = "netlist",
18-
verilog_files = ["//designs/src/aes:verilog"],
18+
verilog_files = ["//flow/designs/src/aes:verilog"],
1919
) for name in BLACKBOXES]
2020

2121
[filegroup(

flow/designs/asap7/ethmac_lvt/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ orfs_flow(
2020
"SDC_FILE": [":constraint.sdc"],
2121
},
2222
top = "ethmac",
23-
verilog_files = ["//designs/src/ethmac_lvt:verilog"],
23+
verilog_files = ["//flow/designs/src/ethmac_lvt:verilog"],
2424
)

0 commit comments

Comments
 (0)