-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build dist-android with --enable-profiler #70054
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @michaelwoerister (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ |
📌 Commit f8870bf has been approved by |
Build dist-android with --enable-profiler This will make the runtime available to enable PGO for Rust code in Firefox on Android. r? @michaelwoerister
Failed in #70099 (comment), @bors r- rollup=never |
This is the error it fails with:
|
At first glance this looks like an issue with the NDK headers on the builder. How can I find out the exact version of the headers being used on that machine? |
According to android/ndk#1117 this is caused by rust/src/libprofiler_builtins/build.rs Line 44 in e82febc
|
…e standard library
From looking at LLVM cmake files it seems like some of the sanitizers are built with @bors r+ |
📌 Commit 50c0562 has been approved by |
@bors p=1 |
⌛ Testing commit 50c0562 with merge d2b9bfafa0e7beabfb8f76a1d05d17db58d4471c... |
@bors retry yield for rollup |
⌛ Testing commit 50c0562 with merge 24f9c25ca02969ded44312e6154126d76aaf7618... |
@bors retry yielding |
⌛ Testing commit 50c0562 with merge e98af6565c499091cfbd21060ff6f50711ba5a14... |
@bors retry yielding |
⌛ Testing commit 50c0562 with merge 105c38f78bd50968ee2308fd41d5c096de28aa92... |
@bors retry rollup=maybe |
Rollup of 8 pull requests Successful merges: - rust-lang#67888 (Prefetch some queries used by the metadata encoder) - rust-lang#69934 (Update the mir inline costs) - rust-lang#69965 (Refactorings to get rid of rustc_codegen_utils) - rust-lang#70054 (Build dist-android with --enable-profiler) - rust-lang#70089 (rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly known.) - rust-lang#70092 (hir: replace "items" terminology with "nodes" where appropriate.) - rust-lang#70138 (do not 'return' in 'throw_' macros) - rust-lang#70151 (Update stdarch submodule) Failed merges: - rust-lang#70074 (Expand: nix all fatal errors) r? @ghost
Trying to build a Rust project with `-Zprofile` for target x86_64-unknown-linux-musl using rustc 1.46.0-nightly (346aec9 2020-07-11), installed with rustup, results in the following error. ``` export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"export CARGO_INCREMENTAL=0$ cargo build --target=x86_64-unknown-linux-muslCompiling hello_world v0.1.0 (…)error[E0463]: can't find crate for `profiler_builtins` | = note: the compiler may have been built without the profiler runtime error: aborting due to previous error For more information about this error, try `rustc --explain E0463`.error: could not compile `hello_world`. To learn more, run the command again with --verbose. ``` `-Zprofile` is required here to enable grcov profiling. This is similar in nature to issue rust-lang#57257, which has been fixed in asimilar way at rust-lang#60476 . A fix for Android has also landed not long ago: rust-lang#70054 . Signed-off-by: Tiago Lam <[email protected]>
Build dist-x86_64-musl with --enable-profiler. Trying to build a Rust project with `-Zprofile` for target x86_64-unknown-linux-musl using rustc 1.46.0-nightly (346aec9 2020-07-11), installed with rustup, results in the following error. ``` export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"export CARGO_INCREMENTAL=0$ cargo build --target=x86_64-unknown-linux-muslCompiling hello_world v0.1.0 (…)error[E0463]: can't find crate for `profiler_builtins` | = note: the compiler may have been built without the profiler runtime error: aborting due to previous error For more information about this error, try `rustc --explain E0463`.error: could not compile `hello_world`. To learn more, run the command again with --verbose. ``` `-Zprofile` is required here to enable grcov profiling. This is similar in nature to issue rust-lang#57257, which has been fixed in asimilar way at rust-lang#60476 . A fix for Android has also landed not long ago: rust-lang#70054 . Signed-off-by: Tiago Lam <[email protected]>
This will make the runtime available to enable PGO for Rust code in Firefox on Android.
r? @michaelwoerister