azure: Install the DMD D compiler

Be more prescriptive about the static linker to use in test case
common/143. This avoids using DMD's 'lib' in preference to clang-cl's
'llvm-lib' when both of them are in PATH
pull/4524/head
Jon Turney 6 years ago committed by Nirbheek Chauhan
parent 1a3b3857c9
commit d55c0b6e94
  1. 14
      ci/azure-steps.yml
  2. 8
      test cases/common/143 C and CPP link/meson.build

@ -58,6 +58,20 @@ steps:
$env:Path = "C:\java\jdk\jdk1.8.0_102\bin\;$env:Path"
}
# install D compiler and dub packages
if ($env:backend -eq 'ninja') {
& .\ci\install-dmd.ps1
$arch = 'x86_mscoff'
if ($Env:arch -eq 'x64') {
$arch = 'x86_64'
}
& dub fetch urld
& dub build urld --compiler=dmd --arch=$arch
& dub fetch dubtestproject
& dub build dubtestproject:test1 --compiler=dmd --arch=$arch
& dub build dubtestproject:test2 --compiler=dmd --arch=$arch
}
# test_find_program exercises some behaviour which relies on .py being in PATHEXT
$env:PATHEXT += ';.py'

@ -26,7 +26,13 @@ libc = static_library('cfoo', ['foo.c', 'foo.h'])
cxx = meson.get_compiler('cpp')
if cxx.get_argument_syntax() == 'msvc'
static_linker = find_program('lib', 'llvm-lib')
if cxx.get_id() == 'msvc'
static_linker = find_program('lib')
elif cxx.get_id() == 'clang-cl'
static_linker = find_program('llvm-lib')
else
error('unable to determine static linker to use with this compiler')
endif
compile_cmd = ['/c', '@INPUT@', '/Fo@OUTPUT@']
stlib_cmd = [static_linker, '/OUT:@OUTPUT@', '@INPUT@']
else

Loading…
Cancel
Save