Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
enable clang's integrated assembler for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdesaulniers authored and tpimh committed Sep 28, 2019
1 parent 935c9cd commit 1a2921f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
41 changes: 21 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ matrix:
env: ARCH=arm32_v6
- name: "ARCH=arm32_v7 LD=ld.lld"
env: ARCH=arm32_v7 LD=ld.lld-10
- name: "ARCH=arm64 LD=ld.lld"
env: ARCH=arm64 LD=ld.lld-10
- name: "ARCH=arm64 AS=clang LD=ld.lld"
env: ARCH=arm64 AS=clang-10 LD=ld.lld-10
- name: "ARCH=mipsel"
env: ARCH=mipsel
- name: "ARCH=ppc32"
Expand All @@ -32,8 +32,8 @@ matrix:
- name: "ARCH=arm32_v7 LD=ld.lld REPO=linux-next"
env: ARCH=arm32_v7 LD=ld.lld-10 REPO=linux-next
if: type = cron
- name: "ARCH=arm64 LD=ld.lld REPO=linux-next"
env: ARCH=arm64 LD=ld.lld-10 REPO=linux-next
- name: "ARCH=arm64 AS=clang LD=ld.lld REPO=linux-next"
env: ARCH=arm64 AS=clang-10 LD=ld.lld-10 REPO=linux-next
if: type = cron
- name: "ARCH=mipsel REPO=linux-next"
env: ARCH=mipsel REPO=linux-next
Expand All @@ -54,8 +54,8 @@ matrix:
- name: "ARCH=arm32_v7 REPO=4.19"
env: ARCH=arm32_v7 REPO=4.19
if: type = cron
- name: "ARCH=arm64 REPO=4.19"
env: ARCH=arm64 REPO=4.19
- name: "ARCH=arm64 AS=clang REPO=4.19"
env: ARCH=arm64 AS=clang-10 REPO=4.19
if: type = cron
- name: "ARCH=ppc64le REPO=4.19"
env: ARCH=ppc64le REPO=4.19
Expand All @@ -66,8 +66,8 @@ matrix:
- name: "ARCH=arm32_v7 REPO=4.14"
env: ARCH=arm32_v7 REPO=4.14
if: type = cron
- name: "ARCH=arm64 REPO=4.14"
env: ARCH=arm64 REPO=4.14
- name: "ARCH=arm64 AS=clang REPO=4.14"
env: ARCH=arm64 AS=clang-10 REPO=4.14
if: type = cron
- name: "ARCH=ppc64le REPO=4.14"
env: ARCH=ppc64le REPO=4.14
Expand All @@ -78,27 +78,27 @@ matrix:
- name: "ARCH=arm32_v7 REPO=4.9"
env: ARCH=arm32_v7 REPO=4.9
if: type = cron
- name: "ARCH=arm64 REPO=4.9"
env: ARCH=arm64 REPO=4.9
- name: "ARCH=arm64 AS=clang REPO=4.9"
env: ARCH=arm64 AS=clang-10 REPO=4.9
if: type = cron
- name: "ARCH=x86_64 LD=ld.lld REPO=4.9"
env: ARCH=x86_64 LD=ld.lld-10 REPO=4.9
if: type = cron
- name: "ARCH=arm64 REPO=4.4"
env: ARCH=arm64 REPO=4.4
- name: "ARCH=arm64 AS=clang REPO=4.4"
env: ARCH=arm64 AS=clang-10 REPO=4.4
if: type = cron
- name: "ARCH=x86_64 LD=ld.lld REPO=4.4"
env: ARCH=x86_64 LD=ld.lld-10 REPO=4.4
if: type = cron
# kernel/common
- name: "ARCH=arm64 REPO=common-4.9"
env: ARCH=arm64 REPO=common-4.9
- name: "ARCH=arm64 AS=clang REPO=common-4.9"
env: ARCH=arm64 AS=clang-10 REPO=common-4.9
if: type = cron
- name: "ARCH=arm64 REPO=common-4.14"
env: ARCH=arm64 REPO=common-4.14
- name: "ARCH=arm64 AS=clang REPO=common-4.14"
env: ARCH=arm64 AS=clang-10 REPO=common-4.14
if: type = cron
- name: "ARCH=arm64 REPO=common-4.19"
env: ARCH=arm64 REPO=common-4.19
- name: "ARCH=arm64 AS=clang REPO=common-4.19"
env: ARCH=arm64 AS=clang-10 REPO=common-4.19
if: type = cron
- name: "ARCH=x86_64 LD=ld.lld REPO=common-4.9"
env: ARCH=x86_64 LD=ld.lld-10 REPO=common-4.9
Expand All @@ -119,8 +119,8 @@ matrix:
- name: "ARCH=arm32_v7 LD=ld.lld LLVM_VERSION=9"
env: ARCH=arm32_v7 LD=ld.lld-9 LLVM_VERSION=9
if: type = cron
- name: "ARCH=arm64 LLVM_VERSION=9"
env: ARCH=arm64 LLVM_VERSION=9
- name: "ARCH=arm64 AS=clang LLVM_VERSION=9"
env: ARCH=arm64 AS=clang-9 LLVM_VERSION=9
if: type = cron
- name: "ARCH=ppc32 LLVM_VERSION=9"
env: ARCH=ppc32 LLVM_VERSION=9
Expand All @@ -147,6 +147,7 @@ script:
- |
docker run \
--env ARCH=${ARCH} \
--env AS=${AS} \
--env LD=${LD} \
--env REPO=${REPO} \
--rm \
Expand Down
9 changes: 8 additions & 1 deletion driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
setup_variables() {
while [[ ${#} -ge 1 ]]; do
case ${1} in
"AR="*|"ARCH="*|"CC="*|"LD="*|"NM"=*|"OBJCOPY"=*|"OBJDUMP"=*|"REPO="*|"STRIP"=*) export "${1?}" ;;
"AR="*|"ARCH="*|"AS"=*|"CC="*|"LD="*|"NM"=*|"OBJCOPY"=*|"OBJDUMP"=*|"REPO="*|"STRIP"=*) export "${1?}" ;;
"-c"|"--clean") cleanup=true ;;
"-j"|"--jobs") shift; jobs=$1 ;;
"-j"*) jobs=${1/-j} ;;
Expand Down Expand Up @@ -227,6 +227,12 @@ check_dependencies() {
check_ar_version
${AR} --version

if [[ -z "${AS:-}" ]]; then
for AS in $(gen_bin_list clang) clang "${CROSS_COMPILE:-}"as; do
command -v ${AS} 2>/dev/null && break
done
fi

if [[ -z "${NM:-}" ]]; then
for NM in $(gen_bin_list llvm-nm) llvm-nm "${CROSS_COMPILE:-}"nm; do
command -v ${NM} 2>/dev/null && break
Expand Down Expand Up @@ -304,6 +310,7 @@ mako_reactor() {
KBUILD_BUILD_HOST=clangbuiltlinux \
make -j"${jobs:-$(nproc)}" \
AR="${AR}" \
AS="${AS}" \
CC="${CC}" \
HOSTCC="${CC}" \
HOSTLD="${HOSTLD:-ld}" \
Expand Down

0 comments on commit 1a2921f

Please sign in to comment.