hackndev / zinc

The bare metal stack for rust
zinc.rs
Apache License 2.0
1k stars 100 forks source link

Switch to using xargo rather than cargo for building Zinc. #400

Closed brandonedens closed 7 years ago

brandonedens commented 8 years ago

Use xargo to build libcore and Zinc: cargo install xargo xargo build --target thumbv7m-none-eabi

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 92.187% when pulling 2781e3d7409ff41c7822311c761b710dc6c180bf on brandonedens:xargo into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 92.187% when pulling 2781e3d7409ff41c7822311c761b710dc6c180bf on brandonedens:xargo into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 92.187% when pulling 2781e3d7409ff41c7822311c761b710dc6c180bf on brandonedens:xargo into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.

brandonedens commented 7 years ago

Sorry for the delay. Hopefully I updated the support script correctly.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling 604f7d92bc2b9e2914ac25add8d00a25d59cf6ae on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling 604f7d92bc2b9e2914ac25add8d00a25d59cf6ae on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling 7caf15bf1278fa171bd538db364c5b9dd64702d0 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling 0908d8c26b2bd8f419f407e5ffbdad04bf24511b on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling 0908d8c26b2bd8f419f407e5ffbdad04bf24511b on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

farcaller commented 7 years ago

Apparently travis image doesn't come with rustup 😞: https://travis-ci.org/hackndev/zinc/jobs/172830505#L386

dhylands commented 7 years ago

Here's one way of doing it: https://github.com/fabricedesre/cc3200-rs/blob/master/.travis.yml https://github.com/fabricedesre/cc3200-rs/blob/master/scripts/travis.sh

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling fae56c851d08125a71d8eb6eb010d102c27a822d on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling fae56c851d08125a71d8eb6eb010d102c27a822d on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling fae56c851d08125a71d8eb6eb010d102c27a822d on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling fae56c851d08125a71d8eb6eb010d102c27a822d on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

mcoffin commented 7 years ago

I had to add back in the rlibc dependency, but with xargo we can now at least use the version from crates.io unmodified!

This is because LLVM, especially in debug mode, likes to render references to memcpy and friends, assuming that you'll provide an implementation.

Working on fixing the travis build right now.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+9.9%) to 95.552% when pulling 89969c2269c3257db3b12aa18e70d9d872b1e068 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+9.9%) to 95.552% when pulling 89969c2269c3257db3b12aa18e70d9d872b1e068 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+9.9%) to 95.552% when pulling e2e47a1f4d82756d9e70f21f23bf3430ae9abe75 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+9.9%) to 95.552% when pulling 21065a76027ce7faa4eb27332813c3ec880866ae on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

mcoffin commented 7 years ago

As of https://travis-ci.org/hackndev/zinc/jobs/177109695 all the cross-platforms build. One of the kcov tasks (the platformtree one) is now failing for the native target. I'll have to take a look later, but we're close.

mcoffin commented 7 years ago

@brandonedens I should be able to pull this when travis comes back up. I fixed the problem and it's working locally. For some reason, the downloaded version of rustup isn't setting the path for the core system libraries properly, so when the binaries are run with kcov you have to set LD_LIBRARY_PATH manually for it to be able to find things like libcore, libsyntax, etc.

farcaller commented 7 years ago

"native" seems to start being broken "by design" 😐

coveralls commented 7 years ago

Coverage Status

Coverage increased (+9.9%) to 95.552% when pulling 1d7eabd42d0c5dd2cb23283142bc598199feca37 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

mcoffin commented 7 years ago

"native" seems to start being broken "by design"

True, but it's kind of necessary for unit testing... I think it's worth keeping around. Honestly, the problem I'm having with travis now is purely due to differences in the rustup that I'm using locally, and the one travis is using, combined with the lack of a good way to set up an environment identical to the one travis has for testing purposes.

It's going to work very soon here, and trust me, this xargo thing is the right way to go right now. It gets rid of all these upstream changes we keep having to track. It will completely deprecate the hackndev fork of rlibc, allowing direct use of the version from crates.io.

@farcaller Also the #zinc channel on mozilla has been seeing some use as a couple people have been trying to use the project. Mainly pushing this through the pipeline so that those guys can start having an easier time.

Might even have time to update my sam3 branch later.

ALSO SUPER EXCITING NEWS: AVR backend lands in LLVM! This means we'll have zinc on arduino boards soon(tm).

coveralls commented 7 years ago

Coverage Status

Coverage increased (+9.9%) to 95.552% when pulling 1d7eabd42d0c5dd2cb23283142bc598199feca37 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling f7c4602d27326c18eb53071b0e1685bb5bf96565 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 85.657% when pulling f7c4602d27326c18eb53071b0e1685bb5bf96565 on brandonedens:xargo into 65fd22e69dc4e17c911aa18f507e0f9b04b64a81 on hackndev:master.