Enable -Zrandomize-layout on nightly toolchain

This commit is contained in:
David Tolnay 2023-02-12 12:25:03 -08:00
parent 785525df07
commit f4baa51409
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -106,5 +106,12 @@ runs:
fi fi
shell: bash shell: bash
- run: |
: enable randomized type layout
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: .*nightly'; then
echo RUSTFLAGS="-Zrandomize-layout ${RUSTFLAGS}" >> $GITHUB_ENV
fi
shell: bash
- run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose - run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose
shell: bash shell: bash