Skip to content
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-x86_64-musl with --enable-profiler. #76035

Merged
merged 1 commit into from
Aug 28, 2020
Merged

Conversation

tiagolam
Copy link
Contributor

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
#57257, which has been fixed in
asimilar way at #60476 .

A fix for Android has also landed not long ago:
#70054 .

Signed-off-by: Tiago Lam [email protected]

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]>
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pietroalbini (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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2020
@pietroalbini
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Aug 28, 2020

📌 Commit e4bd5cd has been approved by pietroalbini

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2020
@bors
Copy link
Contributor

bors commented Aug 28, 2020

⌛ Testing commit e4bd5cd with merge d006f57...

@bors
Copy link
Contributor

bors commented Aug 28, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: pietroalbini
Pushing d006f57 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 28, 2020
@bors bors merged commit d006f57 into rust-lang:master Aug 28, 2020
@cuviper cuviper added this to the 1.48.0 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants