Skip to content

Commit cbe8984

Browse files
committed
toolchains_llvm: patch to accept cros_sdk as a valid distro
cros_sdk is the ChromeOS build environment which is a close match for Debian Linux distros. Tested by building opentitantool in ChromeOS SDK environment. Change-Id: Ic50e8cf57b6758fb1053a390e919beeefaabe7be Signed-off-by: Vadim Bendebury <[email protected]>
1 parent fa2a929 commit cbe8984

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

MODULE.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ single_version_override(
5656
version = "0.59.2",
5757
)
5858

59+
# Support ChromeOS SDK environment as a Debian variant
60+
single_version_override(
61+
module_name = "toolchains_llvm",
62+
patch_strip = 1,
63+
patches = [
64+
"@lowrisc_opentitan//third_party/toolchains_llvm/patches:toolchains_llvm-distroname.patch",
65+
],
66+
version = "1.1.2",
67+
)
68+
5969
# Rust toolchain:
6070
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
6171
rust.repository_set(

MODULE.bazel.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright lowRISC contributors (OpenTitan project).
2+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
# SPDX-License-Identifier: Apache-2.0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/toolchain/internal/release_name.bzl b/toolchain/internal/release_name.bzl
2+
index e3d4a54..d2e5a92 100755
3+
--- a/toolchain/internal/release_name.bzl
4+
+++ b/toolchain/internal/release_name.bzl
5+
@@ -151,7 +151,7 @@ def _linux(llvm_version, distname, version, arch):
6+
os_name = _ubuntu_osname(arch, "20.04", major_llvm_version, llvm_version)
7+
elif distname == "linuxmint" and version.startswith("18"):
8+
os_name = "linux-gnu-ubuntu-16.04"
9+
- elif distname == "debian":
10+
+ elif distname in ["cros_sdk", "debian"]:
11+
int_version = 0
12+
if version.isdigit():
13+
int_version = int(version)

0 commit comments

Comments
 (0)