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

[ci.yml] Add randomize-layout flag #58

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

itsyaasir
Copy link
Contributor

Add -Z randomize-layout flag to the CI when the tests are run in the nighlty toolchain. closes #56

Add `-Z randomize-layout` flag to the CI when the tests are run in the nighlty toolchain.
closes google#56
@google-cla
Copy link

google-cla bot commented Oct 14, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@joshlf
Copy link
Member

joshlf commented Oct 14, 2022

Thanks for this! Looks like the CI failures are because -Z is a flag to rustc, not to Cargo. You can pass it via an environment variable like this:

RUSTFLAGS="-Z randomize-layout" cargo test
RUSTFLAGS="-Z randomize-layout" cargo miri test

@itsyaasir
Copy link
Contributor Author

Thanks for this! Looks like the CI failures are because -Z is a flag to rustc, not to Cargo. You can pass it via an environment variable like this:

RUSTFLAGS="-Z randomize-layout" cargo test
RUSTFLAGS="-Z randomize-layout" cargo miri test

I have just realized that, working on a fix, Thank you

Pass `-Z randomize-layout` as rustc flag via environment variable.
Copy link
Member

@joshlf joshlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks again @itsyaasir !

@joshlf joshlf merged commit b581713 into google:main Oct 14, 2022
joshlf pushed a commit that referenced this pull request Aug 3, 2023
Add `-Z randomize-layout` flag to CI when the tests are run in the nightly toolchain.

Closes #56
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.

Use -Z randomize-layout
2 participants