aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ci/azure-steps.yml40
-rw-r--r--docs/markdown/Videos.md3
-rw-r--r--mesonbuild/compilers/c.py9
-rw-r--r--test cases/common/143 C and CPP link/meson.build8
4 files changed, 54 insertions, 6 deletions
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml
index 8bd8c76..3dde5a3 100644
--- a/ci/azure-steps.yml
+++ b/ci/azure-steps.yml
@@ -43,14 +43,50 @@ steps:
Set-Content "env:$p" "$v"
}
- # download and install python3 and add to path (since it's not installed in vs2015 image!)
if ($env:compiler -eq 'msvc2015') {
+ if ($env:arch -eq 'x86') {
+ $forcex86 = "--forcex86"
+ }
+
+ # download and install python3 and add to path (since it's not installed in vs2015 image!)
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- choco install python3 -y --no-progress --params "/InstallDir:C:\Python3"
+ choco install python3 -y --no-progress $forcex86 --params "/InstallDir:C:\Python3"
$env:Path = "C:\Python3;$env:Path"
+
+ # add JDK installed in vs2015 image to PATH
+ $env:Path = "C:\java\jdk\jdk1.8.0_102\bin\;$env:Path"
+ }
+
+ # install boost (except for clang-cl)
+ if ($env:arch -eq 'x86') { $boost_bitness = '32' } else { $boost_bitness = '64' }
+ if ($env:compiler -eq 'msvc2015') {
+ $boost_version = '1.60.0' ; $boost_abi_tag = '14.0'
+ } elseif ($env:compiler -eq 'msvc2017') {
+ $boost_version = '1.64.0' ; $boost_abi_tag = '14.1'
+ }
+ if ($boost_version) {
+ $boost_filename = $boost_version.Replace('.', '_')
+ Downloadfile -Source "https://sourceforge.net/projects/boost/files/boost-binaries/$boost_version/boost_$boost_filename-msvc-$boost_abi_tag-$boost_bitness.exe" -Destination boost_$boost_filename-msvc-$boost_abi_tag-$boost_bitness.exe
+ Start-Process "boost_$boost_filename-msvc-$boost_abi_tag-$boost_bitness.exe" -ArgumentList "/dir=$(System.WorkFolder)\boost_$boost_filename /silent" -Wait
+ $env:BOOST_ROOT = "$(System.WorkFolder)\boost_$boost_filename"
+ $env:Path = "$env:Path;$env:BOOST_ROOT\lib$boost_bitness-msvc-$boost_abi_tag"
}
+ # 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/docs/markdown/Videos.md b/docs/markdown/Videos.md
index 8146c6e..65fccfe 100644
--- a/docs/markdown/Videos.md
+++ b/docs/markdown/Videos.md
@@ -11,6 +11,9 @@ short-description: Videos about Meson
- [The Meson Build System, 4+ years of work to become an overnight
success](https://www.youtube.com/watch?v=gHdTzdXkhRY), Linux.conf.au 2018
+ - [Power through simplicity, using Python in the Meson Build
+ System](https://youtu.be/3jF3oVsjIEM), Piter.py, 2017
+
- [Meson and the changing Linux build
landscape](https://media.ccc.de/v/ASG2017-111-meson_and_the_changing_linux_build_landscape),
All Systems Go 2017
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 4a79ca0..e5b89ce 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -209,12 +209,15 @@ class CCompiler(Compiler):
# which is wrong and breaks things. Store everything, just to be sure.
pobj = Path(p)
unresolved = pobj.as_posix()
- resolved = Path(p).resolve().as_posix()
if pobj.exists():
if unresolved not in paths:
paths.append(unresolved)
- if resolved not in paths:
- paths.append(resolved)
+ try:
+ resolved = Path(p).resolve().as_posix()
+ if resolved not in paths:
+ paths.append(resolved)
+ except FileNotFoundError:
+ pass
return tuple(paths)
def get_compiler_dirs(self, env, name):
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