forked from openecos-projects/ecc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
86 lines (71 loc) · 3.16 KB
/
MODULE.bazel
File metadata and controls
86 lines (71 loc) · 3.16 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
86
module(
name = "ecc",
version = "0.0.0",
)
bazel_dep(name = "rules_python", version = "1.7.0")
bazel_dep(name = "rules_uv", version = "0.87.0")
bazel_dep(name = "rules_multitool", version = "0.11.0")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "rules_cc", version = "0.2.14")
# NOTE: 0.12.0 fails to load under Bazel 9 (rule() arg mismatch in upstream module extensions).
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
bazel_dep(name = "ecos-bazel")
git_override(
module_name = "ecos-bazel",
remote = "https://github.com/Emin017/ecos-bazel",
commit = "1f223bae8abeed392c72162cd5e98ecbd4f13b9c",
)
# local_path_override(
# module_name = "ecos-bazel",
# path = "./ecos-bazel",
# )
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.11")
use_repo(python, "python_3_11")
uv_export = use_repo_rule("@ecos-bazel//rules:uv_export.bzl", "uv_export")
uv_export(
name = "uv_requirements",
uv_lock = "//:uv.lock",
extras = ["dreamplace"],
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.11",
requirements_lock = "@uv_requirements//:requirements_lock.txt",
extra_pip_args = ["--extra-index-url=https://download.pytorch.org/whl/cpu"],
)
use_repo(pip, "pypi")
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_file(
name = "appimagetool_x86_64_linux",
urls = ["https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"],
sha256 = "b90f4a8b18967545fda78a445b27680a1642f1ef9488ced28b65398f2be7add2",
executable = True,
)
icsprout55_pdk_ext = use_extension("@ecos-bazel//rules:icsprout55_pdk.bzl", "icsprout55_pdk")
use_repo(icsprout55_pdk_ext, "icsprout55_pdk")
oss_cad_suite_ext = use_extension("@ecos-bazel//rules:oss_cad_suite.bzl", "oss_cad_suite")
use_repo(oss_cad_suite_ext, "oss_cad_suite")
patchelf_ext = use_extension("@ecos-bazel//rules:patchelf.bzl", "patchelf")
use_repo(patchelf_ext, "patchelf")
local_source_repo = use_repo_rule("@ecos-bazel//rules:local_source_repo.bzl", "local_source_repo")
# ECC-Tools source tree, imported without BUILD/WORKSPACE files so cmake() glob works.
# (src/third_party contains abseil-cpp/yaml-cpp with their own BUILD files that
# create package boundaries and block glob traversal.)
local_source_repo(
name = "ecc_tools_src",
path = "chipcompiler/thirdparty/ecc-tools",
)
# DreamPlace source tree. No nested BUILD files to strip, so new_local_repository
# suffices. The BUILD template excludes *.so build artifacts via glob(exclude=...).
new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")
new_local_repository(
name = "dreamplace_src",
path = "chipcompiler/thirdparty/ecc-dreamplace",
build_file = "//chipcompiler/thirdparty:dreamplace.BUILD.bazel",
)
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
use_repo(multitool, "multitool")
pkg_config = use_extension("//bazel:pkg_config.bzl", "pkg_config")
use_repo(pkg_config, "pkg_config_path")