From f4baa51409fd28d9ab1770af1bc897b75d3d95a7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 12 Feb 2023 12:25:03 -0800 Subject: [PATCH] Enable -Zrandomize-layout on nightly toolchain --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 21e1bc8..b0865eb 100644 --- a/action.yml +++ b/action.yml @@ -106,5 +106,12 @@ runs: fi 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 shell: bash