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

enable clang's integrated assembler for arm64 #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-9
- name: "ARCH=arm64 LD=ld.lld"
env: ARCH=arm64 LD=ld.lld-9
- name: "ARCH=arm64 AS=clang LD=ld.lld"
env: ARCH=arm64 AS=clang-9 LD=ld.lld-9
- name: "ARCH=ppc32"
env: ARCH=ppc32
- name: "ARCH=ppc64le"
Expand Down Expand Up @@ -45,8 +45,8 @@ matrix:
- name: "ARCH=arm64 REPO=linux-next"
env: ARCH=arm64 REPO=linux-next
if: type = cron
- name: "ARCH=arm64 LD=ld.lld REPO=linux-next"
env: ARCH=arm64 LD=ld.lld-9 REPO=linux-next
- name: "ARCH=arm64 AS=clang LD=ld.lld REPO=linux-next"
env: ARCH=arm64 AS=clang-9 LD=ld.lld-9 REPO=linux-next
if: type = cron
- name: "ARCH=ppc32 REPO=linux-next"
env: ARCH=ppc32 REPO=linux-next
Expand All @@ -64,8 +64,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-9 REPO=4.19
if: type = cron
- name: "ARCH=ppc64le REPO=4.19"
env: ARCH=ppc64le REPO=4.19
Expand All @@ -79,8 +79,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-9 REPO=4.14
if: type = cron
- name: "ARCH=ppc64le REPO=4.14"
env: ARCH=ppc64le REPO=4.14
Expand All @@ -94,17 +94,17 @@ 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-9 REPO=4.9
if: type = cron
- name: "ARCH=x86_64 REPO=4.9"
env: ARCH=x86_64 REPO=4.9
if: type = cron
- name: "ARCH=x86_64 LD=ld.lld REPO=4.9"
env: ARCH=x86_64 LD=ld.lld-9 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-9 REPO=4.4
if: type = cron
- name: "ARCH=x86_64 REPO=4.4"
env: ARCH=x86_64 REPO=4.4
Expand All @@ -113,14 +113,14 @@ matrix:
env: ARCH=x86_64 LD=ld.lld-9 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-9 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-9 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-9 REPO=common-4.19
if: type = cron
- name: "ARCH=x86_64 REPO=common-4.9"
env: ARCH=x86_64 REPO=common-4.9
Expand Down Expand Up @@ -153,8 +153,8 @@ matrix:
- name: "ARCH=arm32_v7 LD=ld.lld LLVM_VERSION=8"
env: ARCH=arm32_v7 LD=ld.lld-8 LLVM_VERSION=8
if: type = cron
- name: "ARCH=arm64 LLVM_VERSION=8"
env: ARCH=arm64 LLVM_VERSION=8
- name: "ARCH=arm64 AS=clang LLVM_VERSION=8"
env: ARCH=arm64 AS=clang-9 LLVM_VERSION=8
if: type = cron
- name: "ARCH=ppc32 LLVM_VERSION=8"
env: ARCH=ppc32 LLVM_VERSION=8
Expand All @@ -178,6 +178,7 @@ script:
- |
docker run \
--env ARCH=${ARCH} \
--env AS=${AS} \
--env LD=${LD} \
--env REPO=${REPO} \
--rm \
Expand Down
8 changes: 7 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="*|"OBJCOPY"=*|"REPO="*) export "${1?}" ;;
"AR="*|"ARCH="*|"AS"=*|"CC="*|"LD="*|"OBJCOPY"=*|"REPO="*) export "${1?}" ;;
"-c"|"--clean") cleanup=true ;;
"-j"|"--jobs") shift; jobs=$1 ;;
"-j"*) jobs=${1/-j} ;;
Expand Down Expand Up @@ -191,6 +191,12 @@ check_dependencies() {
fi
check_objcopy_version
${OBJCOPY} --version

if [[ -z "${AS:-}" ]]; then
for AS in clang-9 "${CROSS_COMPILE:-}"as; do
Copy link
Contributor

@tpimh tpimh Oct 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This always prefers clang as AS unless AS environment variable specified.
There are two ways to change it:

  • Change AS definition in similar fashion with LD (preferred)
  • Basically invert AS variable in travis environment: for every job which specifies AS remove the variable, for every job without this variable add it with value set to appropriate as name for cross-compilation

Anyway this wouldn't work at all because the variable isn't passed to make. I fixed it here: 1a2921f#diff-edd6bdbc5716dde5e06b45ae44b43caaR313

command -v ${AS} 2>/dev/null && break
done
fi
}

# Optimistically check to see that the user has a llvm-ar
Expand Down