Skip to content

Commit 47c5322

Browse files
author
Jorge Aparicio
authored
Merge pull request #54 from japaric/gist
CI: gist the disassemblies
2 parents 9307ee9 + 316f5cb commit 47c5322

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ install:
77
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
88
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
99
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
10+
- gem install gist
1011
- rustc -Vv
1112
- cargo -V
1213

@@ -17,8 +18,11 @@ test_script:
1718
- cargo build --release
1819
- cargo test
1920
- cargo test --release
20-
- CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
21-
- dumpbin /disasm target/release/librustc_builtins.rlib || exit 0
21+
22+
on_success:
23+
- cmd: |
24+
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
25+
dumpbin /disasm target/release/librustc_builtins.rlib | gist -d "'%TARGET%/rustc-builtins.rlib' from commit '%APPVEYOR_REPO_COMMIT%' on branch '%APPVEYOR_REPO_branch%'"
2226
2327
branches:
2428
only:

ci/script.sh

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ set -ex
22

33
. $(dirname $0)/env.sh
44

5+
gist_it() {
6+
gist -ap -f "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'"
7+
echo "Disassembly available at the above URL."
8+
}
9+
510
build() {
611
${CARGO:-cargo} build --target $TARGET
712
${CARGO:-cargo} build --target $TARGET --release
@@ -11,18 +16,24 @@ inspect() {
1116
$PREFIX$NM -g --defined-only target/**/debug/*.rlib
1217

1318
set +e
14-
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib
15-
set -e
16-
17-
# Check presence of weak symbols
1819
case $TRAVIS_OS_NAME in
1920
linux)
20-
local symbols=( memcmp memcpy memmove memset )
21-
for symbol in "${symbols[@]}"; do
22-
$PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol"
23-
done
21+
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib | gist_it "$TARGET/rustc-builtins.rlib"
22+
;;
23+
osx)
24+
$PREFIX$OBJDUMP -Cd target/**/release/*.rlib
2425
;;
2526
esac
27+
set -e
28+
29+
# Check presence of weak symbols
30+
if [[ $TRAVIS_OS_NAME = "linux" ]]; then
31+
local symbols=( memcmp memcpy memmove memset )
32+
for symbol in "${symbols[@]}"; do
33+
$PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol"
34+
done
35+
fi
36+
2637
}
2738

2839
run_tests() {
@@ -38,12 +49,14 @@ run_tests() {
3849

3950
main() {
4051
if [[ $TRAVIS_OS_NAME == "linux" && ${IN_DOCKER_CONTAINER:-n} == "n" ]]; then
41-
local tag=2016-08-13
52+
local tag=2016-08-22
4253

4354
docker run \
4455
--privileged \
4556
-e IN_DOCKER_CONTAINER=y \
4657
-e TARGET=$TARGET \
58+
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
59+
-e TRAVIS_COMMIT=$TRAVIS_COMMIT \
4760
-e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \
4861
-v $(pwd):/mnt \
4962
japaric/rustc-builtins:$tag \

0 commit comments

Comments
 (0)