Otherwise it would say there is nothing to do and `touch src && make`
would be required to trigger a rebuild.
Signed-off-by: Anhad Singh <andypython@protonmail.com>
I noticed a pretty significant delay (of ~5s on my machine) after
executing `make`.
This was because TARGET was currently defined as a recursively expanded
variable. This means that the command:
rustc -Z unstable-options --print target-spec-json | grep llvm-target | cut -d '"' -f4
..will get run everytime TARGET is mentioned. This patch fixes the above
by defining the variable as an immediately expanded value. This will
ensure the command only get run once and still skips if predefined.
Signed-off-by: Anhad Singh <andypython@protonmail.com>
In the next big refactor (next PR), all of the platform functionality
used by both relibc and ld.so will be moved into a `platform`/`sysdeps`
crate and then ld.so would be moved out of relibc and not link with it.
I think doing it in a seperate PR would make it more managable, as when
I did half of it, the diff was pretty huge and that way it would be
easier to review too :)
Signed-off-by: Anhad Singh <andypython@protonmail.com>
Adds a submodules convenience target to main makefile. Submodules must
be initialized before other targets can run successfully.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Typically it's the other way around, but we can't have shared library named libc.so.6 in target/release directory.
cargo includes 'target/release' in LD_LIBRARY_PATH for build script, so even if clean build runs fine,
every subsquent run will make build script link with relibc.