Skip to content

Commit 8ccafe3

Browse files
mikex-osscopybara-github
authored andcommitted
Remove boost dependency from XLS.
It is just replicating the dependency from `@rules_hdl` and depends on the `@com_github_libbacktrace` dep being a transitive dependency. Instead, we just use the one provided by rules_hdl. For this to work, `rules_hdl_dependency_support` needs to be invoked in WORKSPACE before loading of `rules_hdl_init`. This ordering was wrong before and also, cannot happen in a .bzl which loads both together. Since workspace macros are discouraged for hybrid bzlmod mode anyway (https://bazel.build/external/migration#hybrid-mode), we remove `initialize_external.bzl` entirely. Historical footnote: we ended up with two copies after: 1. XLS added boost for nextpnr in f79c1dc. 2. rules_hdl ported it in hdl/bazel_rules_hdl@1c23deb 3. XLS ported a patch with an implicit dependency on rules_hdl in 6bd8019. PiperOrigin-RevId: 799357631
1 parent a5a9718 commit 8ccafe3

File tree

9 files changed

+14
-216
lines changed

9 files changed

+14
-216
lines changed

WORKSPACE

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ load(
3131
# https://github.com/bazelbuild/rules_python/issues/1560#issuecomment-1815118394
3232
py_repositories()
3333

34-
load("//dependency_support:initialize_external.bzl", "initialize_external_repositories")
34+
load("@rules_hdl//dependency_support:dependency_support.bzl", rules_hdl_dependency_support = "dependency_support")
3535

36-
initialize_external_repositories()
36+
rules_hdl_dependency_support()
37+
38+
load("@rules_hdl//:init.bzl", rules_hdl_init = "init")
39+
40+
rules_hdl_init(python_interpreter_target = "@project_python_host//:python")
41+
42+
load("@rules_7zip//:setup.bzl", "setup_7zip") # needed by rules_hdl
43+
44+
setup_7zip()
45+
46+
load("//dependency_support/llvm:initialize.bzl", initialize_llvm = "initialize")
47+
48+
initialize_llvm()

dependency_support/boost/BUILD.bazel

Lines changed: 0 additions & 15 deletions
This file was deleted.

dependency_support/boost/add_python.patch

Lines changed: 0 additions & 60 deletions
This file was deleted.

dependency_support/boost/backtrace_from_rule.patch

Lines changed: 0 additions & 29 deletions
This file was deleted.

dependency_support/boost/downgrade_lzma.patch

Lines changed: 0 additions & 17 deletions
This file was deleted.

dependency_support/boost/initialize.bzl

Lines changed: 0 additions & 20 deletions
This file was deleted.

dependency_support/boost/workspace.bzl

Lines changed: 0 additions & 39 deletions
This file was deleted.

dependency_support/initialize_external.bzl

Lines changed: 0 additions & 32 deletions
This file was deleted.

dependency_support/load_external.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# Eventual goal that none of this is needed anymore and the file can be removed.
2020

2121
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22-
load("//dependency_support/boost:workspace.bzl", repo_boost = "repo")
2322
load("//dependency_support/llvm:workspace.bzl", repo_llvm = "repo")
2423
load("//dependency_support/pprof:workspace.bzl", repo_rules_pprof = "repo")
2524
load("//dependency_support/rules_hdl:workspace.bzl", repo_rules_hdl = "repo")
@@ -39,7 +38,6 @@ def load_external_repositories():
3938
# https://github.com/google/xls/issues/931#issue-1667228764 for more
4039
# information / background.
4140

42-
repo_boost()
4341
repo_llvm()
4442
repo_rules_hdl()
4543
repo_rules_pprof()

0 commit comments

Comments
 (0)