go back to 22.04 to fix glibc version. updates clang for newer features used in v8. also requires a rust toolchain upgrade to build correctly for mysterious and unknown reasons.
What I've done
Fixed incorrect use of cfg! macro use the CARGO_CFG_TARGET_<OS/ARCH> macro instead of the original cfg! (target_<os/arch>) This is because The build script is compiled for the host architecture as a separate build phase, as that's where it runs. Since the cfg macro runs at compile time it'll always report the host configuration there.When cargo runs the build script it passes the configuration through environment variables, one of which is CARGO_CFG_TARGET_ARCH. Some dicussions can be found here
update build.rs to support arm target support arm target. Like the Aarch64 target, we need to additionally install the cross-compilation toolchain and specify the linker in Cargo/config.toml. I can add this part of the work in next pull request if necessary.
Co-authored-by: Matt Mastracci <matthew@mastracci.com>