Skip to content

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

Merged
joshlf merged 2 commits intogoogle:mainfrom
itsyaasir:add-randomize-layout
Oct 14, 2022
Merged

[ci.yml] Add randomize-layout flag#58
joshlf merged 2 commits intogoogle:mainfrom
itsyaasir:add-randomize-layout

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