Commit Graph

102 Commits

Author SHA1 Message Date
Jorge Aparicio
8dad658a6b move intrinsics test from src/bin to examples
with this change the libc crate is not required when calling `cargo build -p
compiler-builtins`
2017-04-11 17:09:05 -05:00
Jorge Aparicio
9c0fe5be3d put test generation behind a Cargo feature
to reduce build time for the most common case of not running tests
2017-04-10 17:27:25 -05:00
Jorge Aparicio
d8576a4f8b modify the CI setup to run tests on the thumb targets 2017-04-10 17:16:13 -05:00
Jorge Aparicio
3ed64e2b50 CI: use a recent nightly
- add #[no_mangle] to the panic_fmt lang item to adjust to changes in
the visibility algorithm

- adjust to changes in the layout of Cargo's target directory

- use a newer Xargo to reduce the build time of the sysroot (only core
is compiled as part of the sysroot now)
2016-12-31 10:04:40 -05:00
bors
9d3cfedce6 Auto merge of #124 - japaric:rustbuild, r=alexcrichton
by default, mark this crate as the #![compiler_builtins] crate

as this is how most users will want to use this crate

r? @alexcrichton
2016-12-13 00:02:56 +00:00
Jorge Aparicio
6da988a43a by default, mark this crate as the #![compiler_builtins] crate
as this is how most users will want to use this crate
2016-12-11 16:18:43 -05:00
Jorge Aparicio
0abb6e20e6 fix the test suite for the thumb targets 2016-12-11 11:18:48 -05:00
Jorge Aparicio
42b4300d36 CI: use Xargo 0.2.x
this version uses the rust-src component that rustup installs instead
of fetching the source tarball from static.r-l.o, which sometimes went
wrong due to the fallible logic that Xargo 0.1.x used
2016-11-23 12:47:42 -05:00
Jorge Aparicio
a5d8d0d9f5 merge apt-get commands 2016-11-12 17:36:59 -05:00
Matt Ickstadt
2c99644aa7 Fix apt 404s in Docker
`apt update` and `apt install` should be in the same Docker RUN statement, otherwise `apt update` will be cached and `apt install` will 404 if a package no longer exists.
2016-11-12 16:08:13 -06:00
Jorge Aparicio
533c78afaf test the mips64 targets 2016-10-14 20:26:59 -05:00
Jorge Aparicio
ab4d5e62fb fix the powerpc64le target
by selecting a CPU that's compatible with the instructions that `rustc`
generates
2016-10-14 09:59:21 -05:00
Jorge Aparicio
fcb19597cf ci/run.sh: remove debug stuff 2016-10-10 20:53:21 -05:00
Jorge Aparicio
3fe4f1c687 fix warnings 2016-10-10 19:45:34 -05:00
Jorge Aparicio
2056d001cf use test::black_box instead of ptr::*_volatile
both prevent LLVM from optimizing away the intrinsics but the former
doesn't produce an `intrinsics` binary that segfaults
2016-10-07 18:26:21 -05:00
Jorge Aparicio
d05514cb20 fix unsafe warnings 2016-10-07 18:19:40 -05:00
Jorge Aparicio
a02ecc8eef get profile.dev (-debug-assertions) + LTO working 2016-10-07 18:19:40 -05:00
Jorge Aparicio
fbf1cc0b75 check that we don't have any call to panic in our implementations 2016-10-07 18:19:40 -05:00
Jorge Aparicio
b0b7453ea3 fix path to .rlib on OSX 2016-10-07 15:03:22 -05:00
Jorge Aparicio
dbd5f05f31 drop the target files 2016-10-06 23:20:09 -05:00
Jorge Aparicio
27adb57c40 fix duplicate symbol test 2016-10-03 20:20:23 -05:00
Jorge Aparicio
e4997a2026 hide the thumbv* target files
due to how Cargo works, the rustc-cfg in build.rs was picking our target
specifications rather than the one the user meant to use. Placing our
target files in any place other than the root of the Cargo project
avoids the issue.
2016-10-02 19:23:54 -05:00
Jorge Aparicio
dd34b80ea0 pick target during Xargo installation 2016-09-30 20:41:59 -05:00
Jorge Aparicio
20926bc1fd give Xargo a $HOME 2016-09-30 20:21:15 -05:00
Jorge Aparicio
9b1c06948d fix Xargo installation 2016-09-30 20:20:15 -05:00
Jorge Aparicio
0864c9d6a2 fix nm call
the prefix was missing a '-', i.e. arm-linux-gnueabinm was being called.
This also sets -e in run.sh to catch this sort of errors.
2016-09-30 19:04:48 -05:00
Jorge Aparicio
d44e127053 use docker run --user instead of manually creating a user 2016-09-30 18:37:41 -05:00
Jorge Aparicio
92204dce54 cache Cargo artifacts
notable changes in the docker-based testing infrastructure

- the docker containers can now modify $CARGO_HOME, to re-use the outer
  Cargo registry, and the target directory to re-use build artifacts.

- the docker containers are removed when their execution finishes
  because it's no longer necessary to re-start them to inspect them
  because all the interesting output is in the outer target directory
2016-09-30 17:39:36 -05:00
Jorge Aparicio
eeaaebc9ac only x86-ish targets can use an unprefixed nm 2016-09-30 13:57:06 -05:00
Jorge Aparicio
148ac030d4 ignore duplicated get_pc_thunk symbols 2016-09-29 19:20:34 -05:00
Jorge Aparicio
a57a63fe08 adapt to new testing infrastructure 2016-09-29 18:50:04 -05:00
Alex Crichton
e7c804a9b0 Expand and refactor teting infrastructure
This commit moves over most of the testing infrastructure to in-tree docker
images that are all dispatched to from Travis (no other test configuration).
This allows versioning modifications to the test infrastructure as well as the
code itself. Additionally separate docker images allows for easy modification of
one without worrying about tampering of others as well as easy addition of new
targets by simply adding a new `Dockerfile`.

Additionally this commit bundles the master version of the `compiler-rt` source
repository from `llvm-mirror/compiler-rt` to test against. The compiler-rt
library itself is compiled as a `cdylib` which is then dynamically located at
runtime and we look for symbols in. There's a few hoops here, but they currently
get the job done.

All tests now execute against both gcc_s and compiler-rt, and this
testing strategy is now all hidden behind a macro as well (refactoring
all existing tests along the way).
2016-09-28 22:09:55 -07:00
Jorge Aparicio
2dc91bd96c put weak mem* symbols behind an opt-in Cargo feature
closes #64
cc #66
2016-09-22 18:02:25 -05:00
Jorge Aparicio
34f17b2ecf test the thumbv7em-none-eabihf target 2016-09-22 06:15:05 -05:00
Jorge Aparicio
e237a46f40 tell cargo which linker to use 2016-08-29 21:35:53 -05:00
Jorge Aparicio
a88958c673 install less stuff
it's already installed in the docker image
2016-08-29 21:25:23 -05:00
Jorge Aparicio
d253b6a2e4 travis: use latest docker image 2016-08-29 21:21:59 -05:00
Jorge Aparicio
80f867f306 pin xargo and gist versions 2016-08-29 20:37:41 -05:00
Jorge Aparicio
17386437c8 fix typo 2016-08-29 20:36:52 -05:00
Jorge Aparicio
a8774eb192 travis: simplify ci scripts 2016-08-29 19:31:49 -05:00
Jorge Aparicio
62d5f58908 print rustup version 2016-08-27 12:34:39 -05:00
Jorge Aparicio
1ae3b29270 use newer docker image
it comes with ruby pre-installed
2016-08-23 21:19:18 -05:00
Jorge Aparicio
185143e90f use the gist gem instead of the gist crate
hopefully this will work on osx and will make everything more
uniform (appveyor is already using the gem instead of the crate)

closes #51
2016-08-23 20:48:24 -05:00
Jorge Aparicio
79411ae643 use the gist crate
but not on OSX because it doesn't work there

closes #53
cc #51
2016-08-22 21:22:16 -05:00
Matt Ickstadt
5e867a2b98 travis: Use wgetpaste to post disassemblies to gist 2016-08-22 17:49:39 -05:00
Jorge Aparicio
43ce7db752 only show disassembly of optimized build
we can't really compare the disassembly of the debug build to
libcompiler-rt.a anyways
2016-08-21 11:09:32 -05:00
Jorge Aparicio
de150c1701 adjust test: weak symbols are now in librlibc.rlib 2016-08-15 20:22:58 -05:00
Jorge Aparicio
670f4e32aa check presence of weak symbols 2016-08-14 22:02:43 -05:00
Jorge Aparicio
44aa941787 disable tests for ppc64le, drop logic around QEMU_ARCH 2016-08-13 19:56:34 -05:00
Jorge Aparicio
2d84d8acd4 add missing apt-get update 2016-08-13 19:30:30 -05:00