diff options
author | Yifan Hong <elsk@google.com> | 2024-02-28 13:53:42 -0800 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2024-02-28 15:06:55 -0800 |
commit | 838d1740bcf5a983d31fa070e38dbb222cd0af3b (patch) | |
tree | 934b252abe9bbdb8eb1588bac183d3cb3ab3e289 | |
parent | a352f919472d8df7ef6fd0628e37314fe626233f (diff) | |
download | u-boot-838d1740bcf5a983d31fa070e38dbb222cd0af3b.tar.gz |
kleaf: Add bzlmod files.
... for bzlmod builds.
Also move extra toolchains to a command line option
because toolchains in WORKSPACE.bzlmod are registered
after those in MODULE.bazel. We need to register
//u-boot:py_toolchain with the highest priority.
Bug: 276493276
Test: TH
Change-Id: If64f88c3a33e8a44012ca102bad27eafba21d41d
-rw-r--r-- | bazel.WORKSPACE | 6 | ||||
-rw-r--r-- | bazel.WORKSPACE.bzlmod | 4 | ||||
-rw-r--r-- | device.bazelrc | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/bazel.WORKSPACE b/bazel.WORKSPACE index 13176d84df..4a4b21ab22 100644 --- a/bazel.WORKSPACE +++ b/bazel.WORKSPACE @@ -1,9 +1,3 @@ -# Call this before define_kleaf_workspace so we -# always prefer the u-boot py_toolchain. -# As a side effect, all u-boot targets, including those that do not need -# this special python, will use this special python. -register_toolchains("//u-boot:py_toolchain") - local_repository( name = "swig", path = "external/swig", diff --git a/bazel.WORKSPACE.bzlmod b/bazel.WORKSPACE.bzlmod new file mode 100644 index 0000000000..79075c6ac3 --- /dev/null +++ b/bazel.WORKSPACE.bzlmod @@ -0,0 +1,4 @@ +local_repository( + name = "swig", + path = "external/swig", +) diff --git a/device.bazelrc b/device.bazelrc new file mode 100644 index 0000000000..2aa3c25fec --- /dev/null +++ b/device.bazelrc @@ -0,0 +1,6 @@ +# Add this as a flag so we +# always prefer the u-boot py_toolchain. +# As a side effect, all u-boot targets, including those that do not need +# this special python, will use this special python. + +common --extra_toolchains=//u-boot:py_toolchain |