You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds comments, and also refactors, to make these steps of the
`pure-rust-build` CI job more readable, and to make clearer what
the wrapping does and how it works:
- "Wrap cc1 (and cc1plus if present) to record calls"
- "Build max-pure with limited dev tools and log cc1"
The logic clarified here was introduced in #1682. The clarification
is mainly through these two changes:
- Document each of the scripts the steps create and use with an
explanatory comment above the "stanza" of code that creates it.
- Extract the command to create the `~/display` symlink to such a
script, which also has such a comment to explain the effect of
writing to that symlink, why it is needed, and why it has to be
set in the same GitHub Actions step as the related `cargo`
command.
Two other less significant clarifcations are made, which arguably
are not refactorings in that they could change the behavior (for
the better) in some hypothetical situations, but the goal is
clarity rather than a behavioral change:
- In the scripts that had more than one non-shebang line, take `-e`
out of the shebangs and use a `set -e` commmand. This makes no
difference in how the scripts are used, since they are always
executed directoy. But may make them easier to read, as readers
need not check that they are only run in this way to verify
their understanding of what they do.
- Set `noclobber` in the step that uses `>` to create the script
files in `/usr/local`, so that if they somehow clash with files
already there, we get an error rather than proceeding and maybe
having them called in unantiicpated ways. The likelihood this
would happen on a GHA runner is very low, so the real impact of
this change is to make immediately clear to readers that the
scripts and their names do not have a pre-defined meaning but are
instead simply helpers for these GHA steps.
0 commit comments