Fix arm builds

This commit is contained in:
klzgrad 2019-10-31 22:16:56 +08:00
parent 39041ee95e
commit a28a12c56c
3 changed files with 18 additions and 18 deletions

View File

@ -10,11 +10,11 @@ matrix:
- name: "linux-arm64" - name: "linux-arm64"
os: linux os: linux
dist: bionic dist: bionic
env: EXTRA_FLAGS='target_cpu="arm64" use_sysroot=true' env: EXTRA_FLAGS='target_cpu="arm64"'
- name: "linux-arm" - name: "linux-arm"
os: linux os: linux
dist: bionic dist: bionic
env: EXTRA_FLAGS='target_cpu="arm" use_sysroot=true' env: EXTRA_FLAGS='target_cpu="arm"'
- name: "osx" - name: "osx"
os: osx os: osx
osx_image: xcode10.2 osx_image: xcode10.2

View File

@ -37,7 +37,6 @@ flags="$flags"'
fatal_linker_warnings=false fatal_linker_warnings=false
treat_warnings_as_errors=false treat_warnings_as_errors=false
use_sysroot=false
fieldtrial_testing_like_official_build=true fieldtrial_testing_like_official_build=true

View File

@ -9,25 +9,26 @@ esac
eval "$EXTRA_FLAGS" eval "$EXTRA_FLAGS"
if [ "$use_sysroot" = true ]; then build_sysroot() {
ln -sfn / ./build/linux/debian_sid_amd64-sysroot local lower="$(echo "$1" | tr '[:upper:]' '[:lower:]')"
sudo mount --bind /usr/lib/x86_64-linux-gnu/pkgconfig /usr/lib/pkgconfig ./build/linux/sysroot_scripts/sysroot-creator-sid-naive.sh "BuildSysroot$1"
rm -rf "./build/linux/debian_sid_$lower-sysroot"
mkdir "./build/linux/debian_sid_$lower-sysroot"
tar xf "./out/sysroot-build/sid/debian_sid_${lower}_sysroot.tar.xz" -C "./build/linux/debian_sid_$lower-sysroot"
}
if [ "$ARCH" = Linux ]; then
case "$target_cpu" in case "$target_cpu" in
arm64) arm64)
rm -rf ./build/linux/debian_sid_arm64-sysroot build_sysroot Amd64
./build/linux/sysroot_scripts/sysroot-creator-sid-naive.sh BuildSysrootARM64 build_sysroot ARM64
mkdir -p ./build/linux/debian_sid_arm64-sysroot
tar xf ./out/sysroot-build/sid/debian_sid_arm64_sysroot.tar.xz -C ./build/linux/debian_sid_arm64-sysroot
;; ;;
arm) arm)
rm -rf ./build/linux/debian_sid_arm-sysroot build_sysroot I386
./build/linux/sysroot_scripts/sysroot-creator-sid-naive.sh BuildSysrootARM build_sysroot ARM
mkdir -p ./build/linux/debian_sid_arm-sysroot ;;
tar xf ./out/sysroot-build/sid/debian_sid_arm_sysroot.tar.xz -C ./build/linux/debian_sid_arm-sysroot *)
rm -rf ./build/linux/debian_sid_i386-sysroot build_sysroot Amd64
./build/linux/sysroot_scripts/sysroot-creator-sid-naive.sh BuildSysrootI386
mkdir -p ./build/linux/debian_sid_i386-sysroot
tar xf ./out/sysroot-build/sid/debian_sid_i386_sysroot.tar.xz -C ./build/linux/debian_sid_i386-sysroot
;; ;;
esac esac
fi fi