cros_setup_toolchains: package rust
The cast folks would like to use Rust on these triples. Our support
story for this is captured in the bug (e.g., no guarantees or SLA; all
best-effort). We can also ship on x86_64 flavors, but no one's asked for
it yet, and I'd rather have someone who wants that ask, so we know it'll
actually see use.
BUG=chromium:1114301
TEST=Unpacked a tarball; verified that a working 'hello world' was
produced by the `rustc` within.
Change-Id: I93081c0e6e9aeafe9cf64cc038a76eaedc6ee94e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2442206
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Nichols <mikenichols@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
diff --git a/scripts/cros_setup_toolchains.py b/scripts/cros_setup_toolchains.py
index bae6574..c768aa4 100644
--- a/scripts/cros_setup_toolchains.py
+++ b/scripts/cros_setup_toolchains.py
@@ -136,6 +136,7 @@
# Packages that needs separate handling, in addition to what we have from
# crossdev.
MANUAL_PKGS = {
+ 'rust': 'dev-lang',
'llvm': 'sys-devel',
'libcxxabi': 'sys-libs',
'libcxx': 'sys-libs',
@@ -1234,10 +1235,11 @@
def MoveUsrBinToBin(path):
"""Move /usr/bin to /bin so people can just use that toplevel dir
- Note we do not apply this to clang - there is correlation between clang's
- search path for libraries / inclusion and its installation path.
+ Note we do not apply this to clang or rust - there is correlation between
+ clang's search path for libraries / inclusion and its installation path.
"""
- if path.startswith('/usr/bin/') and path.find('clang') == -1:
+ if (path.startswith('/usr/bin/') and
+ not any(x in path for x in ('clang', 'rust', 'cargo'))):
return path[4:]
return path
_BuildInitialPackageRoot(output_dir, paths, elfs, ldpaths,