mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 10:10:41 +00:00
Update setup_cros_cargo.sh to fix all paths for chromeos cargo builds
This allows ChromeOS developers to use cargo to build against the crates provided by the ChromeOS source tree, instead of using the bundled submodules. BUG=b:196585250 TEST=./setup_cros_cargo.sh && cargo build Change-Id: I02d38784f7a97657c37c267818499efed4ddab47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3092414 Auto-Submit: Dennis Kempin <denniskempin@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
218c8f313e
commit
faee6ce7fa
1 changed files with 11 additions and 2 deletions
|
@ -8,7 +8,16 @@
|
|||
#
|
||||
# TODO(b/194323235): Add documentation for ChromeOS developer workflows.
|
||||
|
||||
sed -i 's|path = "libcras_stub"|path = "../../third_party/adhd/cras/client/libcras"|g' \
|
||||
Cargo.toml
|
||||
declare -A replacements=(
|
||||
["libcras_stub"]="../../third_party/adhd/cras/client/libcras"
|
||||
["third_party/minijail"]="../../aosp/external/minijail"
|
||||
["third_party/vmm_vhost"]="../../third_party/rust-vmm/vhost"
|
||||
)
|
||||
|
||||
for crate in "${!replacements[@]}"; do
|
||||
echo "Replacing '${crate}' with '${replacements[$crate]}'"
|
||||
sed -i "s|path = \"${crate}|path = \"${replacements[$crate]}|g" \
|
||||
Cargo.toml
|
||||
done
|
||||
|
||||
echo "Modified Cargo.toml with new paths. Please do not commit those."
|
||||
|
|
Loading…
Reference in a new issue