forked from The-OpenROAD-Project/megaboom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
85 lines (74 loc) · 2.83 KB
/
Copy pathMODULE.bazel
File metadata and controls
85 lines (74 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module(
name = "megaboom",
version = "0.0.1",
compatibility_level = 1,
)
bazel_dep(name = "rules_verilator", version = "5.034")
single_version_override(
module_name = "rules_verilator",
registry = "https://raw.githubusercontent.com/Pinata-Consulting/ascenium-registry/683f93e670a04f8d3d47316c42d197d8ac095a00/",
version = "5.034",
)
single_version_override(
module_name = "verilator",
registry = "https://raw.githubusercontent.com/Pinata-Consulting/ascenium-registry/683f93e670a04f8d3d47316c42d197d8ac095a00/",
version = "5.034.ar.1",
)
single_version_override(
module_name = "systemc",
registry = "https://raw.githubusercontent.com/Pinata-Consulting/ascenium-registry/683f93e670a04f8d3d47316c42d197d8ac095a00/",
version = "3.0.1",
)
bazel_dep(
name = "rules_python",
version = "1.6.3",
# reduce namespace collisions by prefixing with bazel_orfs
repo_name = "rules_python",
)
# FIXME why do we need to lock down 3.13 to match bazel-orfs? Without this, 3.11 might get picked
PYTHON_VERSION = "3.13"
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
ignore_root_user_error = True,
python_version = PYTHON_VERSION,
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "megaboom-pip",
python_version = "3.13",
requirements_lock = "//:requirements_lock_3_13.txt",
)
use_repo(pip, "megaboom-pip")
# To test with local bazel-orfs, read: https://github.com/The-OpenROAD-Project/bazel-orfs?tab=readme-ov-file#usage
#
# 1. comment git_override() below
# 2. uncomment local_path_override below
#
# local_path_override(
# module_name = "bazel-orfs", path = "../bazel-orfs"
# )
bazel_dep(name = "bazel-orfs")
git_override(
module_name = "bazel-orfs",
commit = "e3c90ee43c83c79c650bff47e940e9911b70ad99",
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
)
# TL;DR to test with a locally built ORFS docker image, update below after building
# locally and run `bazel mod tidy`:
#
# $ ./build_openroad.sh
# [lots of output deleted]
# 23 naming to docker.io/openroad/flow-ubuntu22.04-builder:7582cf done
# $ docker buildx imagetools inspect openroad/flow-ubuntu22.04-builder --format "{{json .Manifest.Digest}}"
# "sha256:5d4d20d3d5638fa5c79b05c6f9b240c7e5691bf8b6c47c9a46d9bb0e0d53bb09"
# $ bazel mod tidy
# ORFS is provided as a transitive dependency from bazel-orfs, but
# it is possible to specify a version in here if something newer than
# latest bazel-orfs tested ORFS is needed.
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
orfs.default(
image = "docker.io/openroad/orfs:26Q1-204-g3ef8cb7d5",
sha256 = "19914f964ad1ff2d25fe5dc40ee9c8c826d071ebf30e6c0bafb1e65472ac2c92",
)
use_repo(orfs, "com_github_nixos_patchelf_download")
use_repo(orfs, "docker_orfs")