rust-lang / rustc_codegen_gcc

libgccjit AOT codegen for rustc
Apache License 2.0
894 stars 61 forks source link

Rework the option of the build system #478

Closed antoyo closed 3 months ago

antoyo commented 3 months ago

Currently, the way of building rustc_codegen_gcc without building the sysroot is:

./y.sh test --build-only

It would be better if ./y.sh build would do this, so --build-only will not be an option for the command test anymore.

I see two options here:

mubarak23 commented 3 months ago

can you further explain the two options

antoyo commented 3 months ago

We decided to go with the first option, so the work to be done would be to not always build the sysroot in the build system when providing the build command, but only build it when the --sysroot flag is provided.

mubarak23 commented 3 months ago

this mean building it this way

cargo build --sysroot

antoyo commented 3 months ago

No, with the build system that we made for rustc_codegen_gcc which is called from y.sh, so the command would be:

./y.sh build --sysroot
mubarak23 commented 3 months ago

interesting, where do i need to make this changes to reflect what are trying to achieve i.e y.sh or Cargo.toml ?

antoyo commented 3 months ago

In the build system, more precisely, you will need to add a new argument here and only build the sysroot when this new argument (flag) is provided by the user.

mubarak23 commented 3 months ago

now i understand, kindly assign this issue to me, i will work on it

antoyo commented 3 months ago

Done.