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

[libafl_qemu] fix build.rs #435

Merged
merged 1 commit into from
Dec 29, 2021
Merged

Conversation

evanrichter
Copy link
Collaborator

@evanrichter evanrichter commented Dec 28, 2021

I noticed qemu was only building on one core, so I debugged the jobs environment variable. Evidently cargo forwards CARGO_BUILD_JOBS to build.rs scripts as NUM_JOBS. Other env vars for build.rs can be found here

I noticed qemu was only building on one core, so I debugged the jobs environment variable. Evidently cargo passes `CARGO_BUILD_JOBS` is passed to build.rs scripts as `NUM_JOBS`. Other env vars for build.rs can be found [here](https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
@evanrichter
Copy link
Collaborator Author

That reference mentions:

Note that care should be taken when interpreting this environment variable. For historical purposes this is still provided but recent versions of Cargo, for example, do not need to run make -j as it'll automatically happen. Cargo implements its own jobserver and will allow build scripts to inherit this information, so programs compatible with GNU make jobservers will already have appropriately configured parallelism.

So I tested the effect of removing -j entirely, but that was still effectively -j1. It looks like somewhere ninja is receiving -j1 as an argument

@domenukk
Copy link
Member

Thanks!

@domenukk domenukk merged commit e47c3be into AFLplusplus:main Dec 29, 2021
@evanrichter
Copy link
Collaborator Author

No problem! And oh boy the "i368" typo was hard to figure out 🥲

@domenukk
Copy link
Member

Sorry 🙈

khang06 pushed a commit to khang06/LibAFL that referenced this pull request Oct 11, 2022
I noticed qemu was only building on one core, so I debugged the jobs environment variable. Evidently cargo passes `CARGO_BUILD_JOBS` is passed to build.rs scripts as `NUM_JOBS`. Other env vars for build.rs can be found [here](https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants