Biohazrd
Biohazrd copied to clipboard
Generate reference assemblies for lowest common denominator between platforms
Easiest way to do this will probably be to (for example):
- Translate library as x86
- Translate library as x64
- Translate library as ARM64
- Use transformation to find API union of all three (and maybe generate a report of what's missing)
- Generate reference assembly from what remains
This issue is somewhat at odds with the fact that for some libraries we have the following pattern:
- Run
InlineExportHelper
- Rebuild the native components
- Run
LinkImportsTransformation
The strategy presented in the original issue does not jive super well with this strategy since cross-compiling quickly becomes non-trivial for step 2. (Using off-platform target triplets in Clang is already somewhat problematic for this reason as well.)
It might be better to instead recommend that people only do this as a packaging step and have the reference assembly generator run independently of the transformation pipeline. (Although this does not work super well with workflows which have generation live in-solution.)
(An added major downside of that is the fact that you might not know there's a major API that's platform-specific until CI runs.)
Another possibility is recommend people who need this capability do their main development on Windows and provide support for the native rebuild happening in WSL.
-- The WSL components are installed on GitHub Actions Windows runners, but no distro is provisioned. I saw this third party action recommended for installation: https://github.com/marketplace/actions/setup-wsl