File tree 4 files changed +25
-4
lines changed
4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ jobs:
265
265
266
266
# TODO: targets
267
267
target :
268
+ - aarch64-unknown-linux-gnu
268
269
- i686-unknown-linux-gnu
269
270
- x86_64-unknown-linux-musl
270
271
@@ -277,6 +278,9 @@ jobs:
277
278
278
279
# TODO: targets
279
280
include :
281
+ - target : aarch64-unknown-linux-gnu
282
+ host_os : ubuntu-18.04
283
+
280
284
- target : i686-unknown-linux-gnu
281
285
host_os : ubuntu-18.04
282
286
Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ case $target in
45
45
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$android_tools /aarch64-linux-android21-clang
46
46
;;
47
47
aarch64-unknown-linux-gnu)
48
- export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
49
- export AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc-ar
48
+ export CC_aarch64_unknown_linux_gnu=clang-10
49
+ export AR_aarch64_unknown_linux_gnu=llvm-ar-10
50
+ export CFLAGS_aarch64_unknown_linux_gnu=" --sysroot=/usr/aarch64-linux-gnu"
50
51
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
51
52
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=" $qemu_aarch64 "
52
53
;;
@@ -107,7 +108,9 @@ if [ -n "${RING_COVERAGE-}" ]; then
107
108
export RING_BUILD_EXECUTABLE_LIST=" $coverage_dir /executables"
108
109
truncate --size=0 " $RING_BUILD_EXECUTABLE_LIST "
109
110
110
- export LLVM_PROFILE_FILE=" $coverage_dir /%m.profraw"
111
+ # This doesn't work when profiling under QEMU. Instead mk/runner does
112
+ # something similar but different.
113
+ # export LLVM_PROFILE_FILE="$coverage_dir/%m.profraw"
111
114
112
115
# ${target} with hyphens replaced by underscores, lowercase and uppercase.
113
116
target_lower=${target// -/ _}
Original file line number Diff line number Diff line change 38
38
39
39
case $target in
40
40
--target=aarch64-unknown-linux-gnu)
41
+ # Clang is needed for code coverage.
42
+ use_clang=1
41
43
install_packages \
42
44
qemu-user \
43
45
gcc-aarch64-linux-gnu \
Original file line number Diff line number Diff line change 2
2
set -eux -o pipefail
3
3
IFS=$' \n\t '
4
4
5
+ for arg in $* ; do
6
+ # There can be some arguments prefixed in front of the executable, e.g.
7
+ # when qemu-user is used. There can be arguments after the executable,
8
+ # e.g. `cargo test` arguments like `TESTNAME`.
9
+ if [[ $arg = * /deps/* ]]; then
10
+ executable=$arg
11
+ break
12
+ fi
13
+ done
14
+
15
+ export LLVM_PROFILE_FILE=$( dirname " $RING_BUILD_EXECUTABLE_LIST " ) /$( basename " $executable " ) .profraw
16
+
5
17
if [ -n " $RING_BUILD_EXECUTABLE_LIST " ]; then
6
- echo $1 >> " $RING_BUILD_EXECUTABLE_LIST "
18
+ echo " $executable " >> " $RING_BUILD_EXECUTABLE_LIST "
7
19
fi
8
20
9
21
$*
You can’t perform that action at this time.
0 commit comments