Description
Currently, we only distribute a pre-built libgccjit
for x86_64
, requiring people to build it from scatch on other platforms.
We could add a y.sh gcc
command, allowing people to easily clone GCC and build it from source with one command.
Doing so would reduce the barier to entry, and simplify testing on other platforms.
Furthermore, we could integrate this command with cross-ng, allowing people to build cross compilers more easily. We could provide some default configs for common platforms, and allow people to load custom ones.
With a bit more effort(particularly regarding the sysroot), we could even allow people to have multiple builds of libgccjit
, stored somewhere like build/libgccjit/config_name
. People could then select the libgccjit
version they are using(for other commands), like this:
./y.sh rustc --gcc x86_64-linux test.rs # build for x86_64 Linux
./y.sh rustc --gcc dec-alpha-linux test.rs # build for Dec ALPHA Linux
./y.sh rustc --gcc my_config_for_a_very_specific_system # Build with a custom version of `libgccjit`, with some special configs / patches.
This feature could also be useful with Rustup distribution. Providing an easy way to build libgccjit for other platforms would make doing so automatically easier.