Open cbeuw opened 1 year ago
Additionally, I don't think it makes sense to copy and patch the sysroot (via prepare.sh
, prepare_build.sh
and eventually build_sysroot/prepare_sysroot_src.sh
) before the codegen backend is built (which can be done simply with cargo build
with the right LIBRARY_PATH
set (LD_LIBRARY_PATH
is not required). build_sysroot/prepare_sysroot_src.sh
should be run just before building the sysroot
Hi. Thanks for these suggestions. I'd be happy to accept a PR with those changes.
I managed to build this repo, but I found the build process quite difficult, primarily due to the various shell scripts
prepare.sh
pulls hyperfine, rand, regex and simple-raytracer, none of which are required to buildrustc_codegen_gcc
or rust sysroot. These benchmark programs should be moved into a separate scriptsprepare.sh
callscargo build
, which shouldn't be done in the preparation stage. Additionally this is bound to fail as it doesn't know where to findlibgccjit.so
prepare_build.sh
instead, which has the right behaviour and is justprepare.sh
if the above two steps are removed. Perhaps update README to replace mentions ofprepare.sh
withprepare_build.sh
?LIBRARY_PATH
ANDLD_LIBRARY_PATH
to be set while calling./build.sh
, but this is redundant as the script sets them https://github.com/rust-lang/rustc_codegen_gcc/blob/0cbf2b97157e0c3e2d1f809453a527bed4689247/build.sh#L44-L45build.sh
,config.sh
, andtest.sh
overwrites the wholeLIBRARY_PATH
andLD_LIBRARY_PATH
, but the user environment may be non-empty (e.g. when under an environment managed by SPACK) . They should be appended instead.These are all very easy to clean up, though you may have some other considerations so I thought I'd open an issue instead of a PR.