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
Currently we build UET, and then we build UET again with the embedded binaries of all the other platforms. This is necessary so that running uet build -x gitlab on Windows is able to extract UET for macOS for builds that need to run on macOS agents.
However, this effectively means we build the entirety of UET twice, which makes for a slow build.
Instead, I think we can:
Have a uet.chain executable which contains the embedded binaries of UET (including for the current platform). This executable would be tiny in code like uet.shim.
When uet.chain runs, it checks if the first and only argument is of the form extract=<platform>=<path>, in which case it simply extracts the embedded UET for that platform to that path and then exits with exit code 0.
In all other cases, it extracts UET for the current platform to the temporary directory, and executes it with the arguments it was passed and the additional environment variable UET_CHAIN_PATH=<path to self>.
When UET wants to extract a UET binary for another platform, it looks for the UET_CHAIN_PATH environment variable and calls the executable at that path with extract=<platform>=<path> to do the extraction.
The uet.chain executable is what gets published as the full "uet" binaries on GitHub.
This eliminates the two-pass build process entirely. My only concern here would be non-Windows-Defender AV programs complaining about the extract-executable-and-run flow, since they can be quite sensitive to this sort of behaviour.
The text was updated successfully, but these errors were encountered:
Currently we build UET, and then we build UET again with the embedded binaries of all the other platforms. This is necessary so that running
uet build -x gitlab
on Windows is able to extract UET for macOS for builds that need to run on macOS agents.However, this effectively means we build the entirety of UET twice, which makes for a slow build.
Instead, I think we can:
uet.chain
executable which contains the embedded binaries of UET (including for the current platform). This executable would be tiny in code likeuet.shim
.uet.chain
runs, it checks if the first and only argument is of the formextract=<platform>=<path>
, in which case it simply extracts the embedded UET for that platform to that path and then exits with exit code 0.UET_CHAIN_PATH=<path to self>
.UET_CHAIN_PATH
environment variable and calls the executable at that path withextract=<platform>=<path>
to do the extraction.uet.chain
executable is what gets published as the full "uet" binaries on GitHub.This eliminates the two-pass build process entirely. My only concern here would be non-Windows-Defender AV programs complaining about the extract-executable-and-run flow, since they can be quite sensitive to this sort of behaviour.
The text was updated successfully, but these errors were encountered: