Open MichaelSimons opened 1 year ago
Longer term, every system-dependent dependency needs to consider the cross-compiler case, i.e. "do I want the package for $BUILD
, $HOST
or $TARGET
. In this case, we care about ilasm/ildasm for $BUILD
, but there are cases where we care about $HOST
or $TARGET
or some combination of the above.
Consider how Mariner is always running on x64 Linux, but building for arm64, musl, etc etc etc. Or we do our osx-arm64/windows-arm64 builds on x64 VMs.
https://github.com/dotnet/emsdk/blob/main/eng/emsdk.proj#L17 is how I do that logic in emsdk - depend on the BuildArchitecture package, depend on the TargetArchitecture package, and bounce the whole PackageReference ItemGroup through a temporary second ItemGroup, using ->Distinct()
, to eliminate the native-build case (the same dependency twice breaks things)
The prep bootstrap logic currently pulls packages for a variety of RIDs
This list is continually growing. It is unnecessary/wasteful to pull all of these artifacts except for the one applicable for the current platform. The logic should be updated appropriately to pull packages for a single RID.
When fixing, please consider whether this should be the only behavior or if other options should be supported. e.g. it maybe useful from a testing perspective to be able to pull all rids to ensure packages exist. Today we don't run a linux-musl-arm64 leg in CI.