mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
Downgrade arm cross compile toolchain to glibc 2.34 (#7153)
This commit is contained in:
parent
364da19122
commit
e873664fe8
|
@ -52,10 +52,11 @@ jobs:
|
||||||
vmImage: "ubuntu-latest"
|
vmImage: "ubuntu-latest"
|
||||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
||||||
steps:
|
steps:
|
||||||
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz?rev=22c39fc25e5541818967b4ff5a09ef3e&hash=E7676169CE35FC2AAECF4C121E426083871CA6E5'
|
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz?rev=33c6e30e5ac64e6dba8f0431f2c35f1b&hash=9918A05BF47621B632C7A5C8D2BB438FB80A4480'
|
||||||
- script: mkdir -p /tmp/arm-toolchain/
|
- script: mkdir -p /tmp/arm-toolchain/
|
||||||
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
||||||
|
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin'
|
||||||
- script: echo $PATH
|
- script: echo $PATH
|
||||||
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
||||||
- task: PythonScript@0
|
- task: PythonScript@0
|
||||||
|
@ -65,15 +66,6 @@ jobs:
|
||||||
scriptPath: scripts/mk_unix_dist.py
|
scriptPath: scripts/mk_unix_dist.py
|
||||||
arguments: --nodotnet --nojava --arch=arm64
|
arguments: --nodotnet --nojava --arch=arm64
|
||||||
pythonInterpreter: $(python)
|
pythonInterpreter: $(python)
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
displayName: 'Clone z3test'
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Test
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: z3test/scripts/test_benchmarks.py
|
|
||||||
arguments: build-dist/z3 z3test/regressions/smt2
|
|
||||||
pythonInterpreter: $(python)
|
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
inputs:
|
inputs:
|
||||||
sourceFolder: dist
|
sourceFolder: dist
|
||||||
|
|
|
@ -171,12 +171,22 @@ def mk_z3():
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def get_os_name():
|
def get_os_name():
|
||||||
|
global LINUX_X64
|
||||||
if OS_NAME is not None:
|
if OS_NAME is not None:
|
||||||
return OS_NAME
|
return OS_NAME
|
||||||
import platform
|
import platform
|
||||||
basic = os.uname()[0].lower()
|
basic = os.uname()[0].lower()
|
||||||
if basic == 'linux':
|
if basic == 'linux':
|
||||||
dist = platform.libc_ver()
|
if mk_util.IS_ARCH_ARM64 and LINUX_X64:
|
||||||
|
# handle cross compiling
|
||||||
|
# example: 'ldd (GNU) 2.34'
|
||||||
|
lines = subprocess.check_output(["ldd", "--version"]).decode('ascii')
|
||||||
|
first_line = lines.split("\n")[0]
|
||||||
|
ldd_version = first_line.split()[-1]
|
||||||
|
# coerce the format to platform.libc_ver() return type
|
||||||
|
dist = ('glibc', ldd_version)
|
||||||
|
else:
|
||||||
|
dist = platform.libc_ver()
|
||||||
if len(dist) == 2 and len(dist[0]) > 0 and len(dist[1]) > 0:
|
if len(dist) == 2 and len(dist[0]) > 0 and len(dist[1]) > 0:
|
||||||
return '%s-%s' % (dist[0].lower(), dist[1].lower())
|
return '%s-%s' % (dist[0].lower(), dist[1].lower())
|
||||||
else:
|
else:
|
||||||
|
@ -199,8 +209,14 @@ def get_os_name():
|
||||||
return basic
|
return basic
|
||||||
|
|
||||||
def get_z3_name():
|
def get_z3_name():
|
||||||
|
import platform as platform_module
|
||||||
|
# Note that the platform name this function return
|
||||||
|
# has to work together with setup.py
|
||||||
|
# It's not the typical output from platform.machine()
|
||||||
major, minor, build, revision = get_version()
|
major, minor, build, revision = get_version()
|
||||||
if mk_util.IS_ARCH_ARM64:
|
if mk_util.IS_ARCH_ARM64 or platform_module.machine() == "aarch64":
|
||||||
|
# the second case handle native build on aarch64
|
||||||
|
# TODO: we don't handle cross compile on host aarch64 to target x64
|
||||||
platform = "arm64"
|
platform = "arm64"
|
||||||
elif sys.maxsize >= 2**32:
|
elif sys.maxsize >= 2**32:
|
||||||
platform = "x64"
|
platform = "x64"
|
||||||
|
|
|
@ -203,10 +203,11 @@ stages:
|
||||||
vmImage: "ubuntu-latest"
|
vmImage: "ubuntu-latest"
|
||||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
||||||
steps:
|
steps:
|
||||||
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz?rev=22c39fc25e5541818967b4ff5a09ef3e&hash=E7676169CE35FC2AAECF4C121E426083871CA6E5'
|
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz?rev=33c6e30e5ac64e6dba8f0431f2c35f1b&hash=9918A05BF47621B632C7A5C8D2BB438FB80A4480'
|
||||||
- script: mkdir -p /tmp/arm-toolchain/
|
- script: mkdir -p /tmp/arm-toolchain/
|
||||||
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
||||||
|
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin'
|
||||||
- script: echo $PATH
|
- script: echo $PATH
|
||||||
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
||||||
- task: PythonScript@0
|
- task: PythonScript@0
|
||||||
|
|
Loading…
Reference in a new issue