It's a common problem that the system installed version of virglrenderer
is used during the build, which almost always is too old to be used
with crosvm.
BUG=b:220199446
TEST=CQ
Change-Id: Iaf8c8a6ac359eecee4fff4025c04c524ced2e329
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4506283
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This won't be functional at runtime, but does allow us to at
least compile with gfxstream enabled.
BUG=b:244618506
TEST=presubmit
Change-Id: I72a63976310e635964645a1265a22518fc6cb694
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3967431
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
If the -ldrm option is added before the virglrenderer library in the
linker command line, the libdrm symbols will not be available, since
they aren't used and will be dropped by the linker. Move the
virglrenderer deps into a helper function to avoid duplication and call
it after the virglrenderer build to get the linker options in the right
order.
BUG=b:244618790
TEST=tools/dev_container tools/presubmit --all # with wl-dmabuf feature
Change-Id: I55cc96a28a1f02e7b6081d3cfa08bc3446b8e6a1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3905092
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.
This fulfills the request from legal and unifies our notices.
./tools/health-check has been updated to only accept this style.
BUG=b:246579983
TEST=./tools/health-check
Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.
Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.
BUG=b:239937122
TEST=CQ
Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This is a reland of commit 2b85d4d1e5
Diff from the original CL:
* Changed the return value of `main()` in power_monitor/build.rs
* Ran cargo-check with all features enabled
Original change's description:
> github: Minimize dependencies for document generation
>
> Instead of install full dependencies with `install-deps` in GitHub
> action, minimize dependencies because we use GitHub only for document
> generation.
>
> - Passed `CARGO_DOC` environment when running cargo-doc command so we
> can skip unnecessary build flow when we just want to generate API docs.
> - Added a new script `install-docs-deps` to install only doc-related
> dependencies.
>
> BUG=none
> TEST=test on GitHub Action at my personal repository
>
> Change-Id: Ibe988ab43215e285d946812bdd6c1536ae87b50e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3578144
> Tested-by: kokoro <noreply+kokoro@google.com>
> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
> Reviewed-by: Anton Romanov <romanton@google.com>
> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Bug=none
TEST=cargo check --all-features
Change-Id: I77ee6543910e3fe7f69be48f8f965eda3433d4e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3584063
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
This reverts commit 2b85d4d1e5.
Reason for revert: breaks powerd compile
Original change's description:
> github: Minimize dependencies for document generation
>
> Instead of install full dependencies with `install-deps` in GitHub
> action, minimize dependencies because we use GitHub only for document
> generation.
>
> - Passed `CARGO_DOC` environment when running cargo-doc command so we
> can skip unnecessary build flow when we just want to generate API docs.
> - Added a new script `install-docs-deps` to install only doc-related
> dependencies.
>
> BUG=none
> TEST=test on GitHub Action at my personal repository
>
> Change-Id: Ibe988ab43215e285d946812bdd6c1536ae87b50e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3578144
> Tested-by: kokoro <noreply+kokoro@google.com>
> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
> Reviewed-by: Anton Romanov <romanton@google.com>
> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Bug: none
Change-Id: Ie16b65235490071ac4e69bf3f09af3ba0c766eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581836
Auto-Submit: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Instead of install full dependencies with `install-deps` in GitHub
action, minimize dependencies because we use GitHub only for document
generation.
- Passed `CARGO_DOC` environment when running cargo-doc command so we
can skip unnecessary build flow when we just want to generate API docs.
- Added a new script `install-docs-deps` to install only doc-related
dependencies.
BUG=none
TEST=test on GitHub Action at my personal repository
Change-Id: Ibe988ab43215e285d946812bdd6c1536ae87b50e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3578144
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Anton Romanov <romanton@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
At the moment compiling with the "virgl_renderer" feature enabled but
"x" disabled results in a link error because the virgl_renderer enables
all its platforms without checking. Fix this by enabling the glx
platform only if the x feature has also been enabled.
BUG=b:226033718
TEST=`cargo build --features "virgl_renderer"` passes.
TEST=`cargo build --features "virgl_renderer,x"` passes and enables GLX
in virgl_renderer.
Change-Id: I85041fc2a3db7e49415add69389bee3160ba4a5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3539327
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Sprinkle cfg checks throughout build.rs to get rid of the compiler
warnings about unused functions when building with the default features
(without --features=virgl_renderer).
BUG=None
TEST=cargo build
TEST=cargo build --features=virgl_renderer
Change-Id: I2a1548ec0de33d958c5cd5b6658ec92cd6840566
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3243013
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
The constants already existed but weren't being used consistently. This
will make the Android downstream patches to change the paths a little
simpler.
BUG=b:204072128
TEST=tools/run_tests
Change-Id: If9b81ef9ca0a7c52f0d9fe7cf836841027a2c92d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3253369
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Andrew Walbran <qwandor@google.com>
Auto-Submit: Andrew Walbran <qwandor@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
If the virglrenderer feature isn't enabled, skip building virglrenderer.
This fixes cross-compiling for architectures that don't have libdrm
ready.
Change-Id: I397864ea6104896e1d12a838834d7d0b09a485be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3221693
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Both libraries have previously been built as part of
ci/build_environment/Makefile. This CL moves that behavior into the
build.rs file of rutabaga_gfx.
This is the last third party dependency that we need to build from
source, and allows us to build/test on the host machine instead of
requiring the builder container.
It also allows us to greatly simplify the builder containers, which
I will do in a follow-up CL as we also need to upgrade them to bullseye.
This CL uprevs virglrenderer to include:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/609
and minigbm to include: https://crrev.com/c/3141018
BUG=b:196059146
TEST=./test_all && ./run_tests --run-privileged
Change-Id: I4442ccc991d13a3fcfa224de50e916b3926f0cb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3141771
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>