Add a test run of MSVC ARM64 cross on Windows x64

Add a cross-file for MSVC UWP ARM64.

Bump cidata tag to get an updated install.ps1 script (run by run.ps1)
which sets the vcvars environment correctly when cross-compiling.

Since arranging the correct environment for simultaneous cross and
native 'cl' use is hard, this is test run uses '--cross-only' so we
don't require a native compiler.

Extend '--cross-only' so it also explicitly uses a machine file which
makes all build machine compilers unusable.
pull/7726/head
Jon Turney 6 years ago committed by Nirbheek Chauhan
parent a908404e6d
commit 6a56291a2a
  1. 5
      azure-pipelines.yml
  2. 8
      ci/run.ps1
  3. 17
      cross/arm64cl.txt
  4. 18
      cross/none.txt
  5. 9
      run_cross_test.py

@ -56,6 +56,11 @@ jobs:
arch: x64
compiler: msvc2019
backend: vs2019
vc2019arm64ninjacross:
arch: arm64
compiler: msvc2019
backend: ninja
extraargs: --cross arm64cl.txt --cross-only
steps:
- task: UsePythonVersion@0

@ -34,10 +34,10 @@ function DownloadFile([String] $Source, [String] $Destination) {
}
if ($env:backend -eq 'ninja') { $dmd = $true } else { $dmd = $false }
if (($env:backend -eq 'ninja') -and ($env:arch -ne 'arm64')) { $dmd = $true } else { $dmd = $false }
DownloadFile -Source https://github.com/mesonbuild/cidata/releases/download/ci2/ci_data.zip -Destination $env:AGENT_WORKFOLDER\ci_data.zip
echo "Extracting ci_data.zip"
DownloadFile -Source https://github.com/mesonbuild/cidata/releases/download/ci3/ci_data.zip -Destination $env:AGENT_WORKFOLDER\ci_data.zip
echo "Extracting ci_data.zip"
Expand-Archive $env:AGENT_WORKFOLDER\ci_data.zip -DestinationPath $env:AGENT_WORKFOLDER\ci_data
& "$env:AGENT_WORKFOLDER\ci_data\install.ps1" -Arch $env:arch -Compiler $env:compiler -Boost $true -DMD $dmd
@ -75,4 +75,4 @@ echo "=== Start running tests ==="
# Starting from VS2019 Powershell(?) will fail the test run
# if it prints anything to stderr. Python's test runner
# does that by default so we need to forward it.
cmd /c 'python 2>&1' run_tests.py --backend $env:backend
cmd /c "python 2>&1 run_tests.py --backend $env:backend $env:extraargs"

@ -0,0 +1,17 @@
[binaries]
c = 'cl'
cpp = 'cl'
ar = 'lib'
windres = 'rc'
[properties]
c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP']
c_link_args = ['-APPCONTAINER', 'WindowsApp.lib']
cpp_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP']
cpp_link_args = ['-APPCONTAINER', 'WindowsApp.lib']
[host_machine]
system = 'windows'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

@ -0,0 +1,18 @@
# native file used to make the build machine compiler unusable
[host_machine]
system = 'none'
cpu_family = 'none'
cpu = 'none'
endian = 'little'
[properties]
[binaries]
c = ['false']
cpp = ['false']
objc = ['false']
objcpp = ['false']
ar = ['false']
pkgconfig = ['false']
cmake = ['false']

@ -29,7 +29,14 @@ def runtests(cross_file, failfast, cross_only):
tests = ['--only', 'common']
if not cross_only:
tests.append('native')
cmd = mesonlib.python_command + ['run_project_tests.py', '--backend', 'ninja'] + (['--failfast'] if failfast else []) + tests + ['--cross-file', cross_file]
cmd = mesonlib.python_command + ['run_project_tests.py', '--backend', 'ninja']
if failfast:
cmd += ['--failfast']
cmd += tests
cmd += ['--cross-file', cross_file]
cmd += ['--'] # args following this are passed directly to meson
if cross_only:
cmd += ['--native-file', 'cross/none.txt']
return subprocess.call(cmd)
def main():

Loading…
Cancel
Save