aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-11-15 18:49:46 +0000
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-11-16 20:26:02 +0530
commitd55c0b6e94d2031ba9562c46b58349516e1e16dc (patch)
tree46030bbd78f55d9d4dda260d1c49b34b03337550
parent1a3b3857c91d4288d875a752e400ed98fa3801a6 (diff)
downloadmeson-d55c0b6e94d2031ba9562c46b58349516e1e16dc.zip
meson-d55c0b6e94d2031ba9562c46b58349516e1e16dc.tar.gz
meson-d55c0b6e94d2031ba9562c46b58349516e1e16dc.tar.bz2
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
-rw-r--r--ci/azure-steps.yml14
-rw-r--r--test cases/common/143 C and CPP link/meson.build8
2 files changed, 21 insertions, 1 deletions
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml
index 1c665ef..ec2ee94 100644
--- a/ci/azure-steps.yml
+++ b/ci/azure-steps.yml
@@ -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'
diff --git a/test cases/common/143 C and CPP link/meson.build b/test cases/common/143 C and CPP link/meson.build
index af5c54a..79d6f67 100644
--- a/test cases/common/143 C and CPP link/meson.build
+++ b/test cases/common/143 C and CPP link/meson.build
@@ -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