aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--ciimage/Dockerfile14
-rw-r--r--cross/ubuntu-armhf.txt4
-rw-r--r--docs/markdown/Cross-compilation.md1
-rw-r--r--mesonbuild/build.py2
-rw-r--r--mesonbuild/dependencies/misc.py7
-rw-r--r--mesonbuild/interpreter.py15
-rwxr-xr-xrun_tests.py2
-rw-r--r--test cases/d/3 shared library/meson.build4
-rw-r--r--test cases/d/4 library versions/meson.build4
-rw-r--r--test cases/d/7 multilib/meson.build4
-rw-r--r--test cases/failing/66 string as link target/meson.build2
-rw-r--r--test cases/failing/66 string as link target/prog.c1
-rwxr-xr-xtest cases/frameworks/17 mpi/is_artful.py9
-rw-r--r--test cases/frameworks/17 mpi/meson.build10
15 files changed, 60 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index 559b39c..e69cb31 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,13 +33,13 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi
# Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p $HOME/tools; curl -L http://nirbheek.in/files/binaries/ninja/macos/ninja -o $HOME/tools/ninja; chmod +x $HOME/tools/ninja; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:zesty; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:artful; fi
# We need to copy the current checkout inside the Docker container,
# because it has the MR id to be tested checked out.
script:
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:zesty > Dockerfile; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:artful > Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
- |
diff --git a/ciimage/Dockerfile b/ciimage/Dockerfile
index 1c9e8d8..839a429 100644
--- a/ciimage/Dockerfile
+++ b/ciimage/Dockerfile
@@ -1,16 +1,14 @@
-FROM ubuntu:zesty
+FROM ubuntu:artful
RUN apt-get -y update && apt-get -y upgrade \
&& apt-get -y install git wget unzip \
&& apt-get -y build-dep meson \
-&& apt-get -y install qt5-default itstool clang libgtk-3-dev \
-&& apt-get -y install pkg-config-arm-linux-gnueabihf g++-6-arm-linux-gnueabihf \
-&& apt-get -y install valgrind doxygen \
-&& apt-get -y install llvm libsdl2-dev \
+&& apt-get -y install qt5-default clang \
+&& apt-get -y install pkg-config-arm-linux-gnueabihf g++-7-arm-linux-gnueabihf \
+&& apt-get -y install doxygen \
&& apt-get -y install python3-pip libxml2-dev libxslt1-dev cmake libyaml-dev \
-&& apt-get -y install openmpi-bin libopenmpi-dev \
-&& apt-get -y install libboost-log-dev \
-&& apt-get -y install libvulkan-dev libpcap-dev libcups2-dev \
+&& apt-get -y install libcups2-dev \
&& apt-get -y install gcovr lcov \
+&& apt-get -y install fpga-icestorm arachne-pnr yosys \
&& apt-get -y install gtk-sharp2 gtk-sharp2-gapi libglib2.0-cil-dev \
&& python3 -m pip install hotdoc codecov
diff --git a/cross/ubuntu-armhf.txt b/cross/ubuntu-armhf.txt
index d0fce20..367eba3 100644
--- a/cross/ubuntu-armhf.txt
+++ b/cross/ubuntu-armhf.txt
@@ -1,8 +1,8 @@
[binaries]
# we could set exe_wrapper = qemu-arm-static but to test the case
# when cross compiled binaries can't be run we don't do that
-c = '/usr/bin/arm-linux-gnueabihf-gcc-6'
-cpp = '/usr/bin/arm-linux-gnueabihf-g++-6'
+c = '/usr/bin/arm-linux-gnueabihf-gcc-7'
+cpp = '/usr/bin/arm-linux-gnueabihf-g++-7'
ar = '/usr/arm-linux-gnueabihf/bin/ar'
strip = '/usr/arm-linux-gnueabihf/bin/strip'
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md
index e232033..f68b1f5 100644
--- a/docs/markdown/Cross-compilation.md
+++ b/docs/markdown/Cross-compilation.md
@@ -69,6 +69,7 @@ c = '/usr/bin/i586-mingw32msvc-gcc'
cpp = '/usr/bin/i586-mingw32msvc-g++'
ar = '/usr/i586-mingw32msvc/bin/ar'
strip = '/usr/i586-mingw32msvc/bin/strip'
+pkgconfig = '/usr/bin/i586-mingw32msvc-pkg-config'
exe_wrapper = 'wine' # A command used to run generated executables.
```
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 2a71b8b..2840f29 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -863,6 +863,8 @@ You probably should put it in link_with instead.''')
def link(self, target):
for t in listify(target, unholder=True):
+ if not isinstance(t, Target):
+ raise InvalidArguments('{!r} is not a target.'.format(t))
if not t.is_linkable_target():
raise InvalidArguments('Link target {!r} is not linkable.'.format(t))
if isinstance(self, SharedLibrary) and isinstance(t, StaticLibrary) and not t.pic:
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 81bcdcb..a24c873 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -359,11 +359,12 @@ class BoostDependency(ExternalDependency):
args.append('-L' + self.libdir)
for lib in self.requested_modules:
# The compiler's library detector is the most reliable so use that first.
- default_detect = self.compiler.find_library('boost_' + lib, self.env, [])
+ boost_lib = 'boost_' + lib
+ default_detect = self.compiler.find_library(boost_lib, self.env, [])
if default_detect is not None:
args += default_detect
- elif lib in self.lib_modules:
- linkcmd = '-l' + lib
+ elif boost_lib in self.lib_modules:
+ linkcmd = '-l' + boost_lib
args.append(linkcmd)
return args
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index d9ab733..dd23070 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1579,6 +1579,10 @@ class Interpreter(InterpreterBase):
if not isinstance(d, (dependencies.Dependency, dependencies.ExternalLibrary, dependencies.InternalDependency)):
raise InterpreterException('Dependencies must be external deps')
final_deps.append(d)
+ for l in libs:
+ if isinstance(l, dependencies.Dependency):
+ raise InterpreterException('''Entries in "link_with" may only be self-built targets,
+external dependencies (including libraries) must go to "dependencies".''')
dep = dependencies.InternalDependency(version, incs, compile_args,
link_args, libs, sources, final_deps)
return DependencyHolder(dep)
@@ -1634,6 +1638,9 @@ class Interpreter(InterpreterBase):
raise InterpreterException('Program or command {!r} not found'
'or not executable'.format(cmd))
cmd = prog
+ cmd_path = os.path.relpath(cmd.get_path(), start=srcdir)
+ if not cmd_path.startswith('..') and cmd_path not in self.build_def_files:
+ self.build_def_files.append(cmd_path)
expanded_args = []
for a in listify(cargs):
if isinstance(a, str):
@@ -1644,6 +1651,14 @@ class Interpreter(InterpreterBase):
expanded_args.append(a.held_object.get_path())
else:
raise InterpreterException('Arguments ' + m.format(a))
+ for a in expanded_args:
+ if not os.path.isabs(a):
+ a = os.path.join(builddir if in_builddir else srcdir, self.subdir, a)
+ if os.path.exists(a):
+ a = os.path.relpath(a, start=srcdir)
+ if not a.startswith('..'):
+ if a not in self.build_def_files:
+ self.build_def_files.append(a)
return RunProcess(cmd, expanded_args, srcdir, builddir, self.subdir,
self.environment.get_build_command() + ['introspect'], in_builddir)
diff --git a/run_tests.py b/run_tests.py
index 00c97ca..79c9639 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -125,7 +125,7 @@ def get_fake_options(prefix):
return opts
def should_run_linux_cross_tests():
- return shutil.which('arm-linux-gnueabihf-gcc-6') and not platform.machine().lower().startswith('arm')
+ return shutil.which('arm-linux-gnueabihf-gcc-7') and not platform.machine().lower().startswith('arm')
def run_configure_inprocess(commandlist):
old_stdout = sys.stdout
diff --git a/test cases/d/3 shared library/meson.build b/test cases/d/3 shared library/meson.build
index 4ca3137..78ad766 100644
--- a/test cases/d/3 shared library/meson.build
+++ b/test cases/d/3 shared library/meson.build
@@ -2,8 +2,8 @@ project('D Shared Library', 'd')
dc = meson.get_compiler('d')
if dc.get_id() == 'gcc'
- if dc.version().version_compare('< 7')
- error('MESON_SKIP_TEST: GDC < 7.0 can not build shared libraries')
+ if dc.version().version_compare('< 8')
+ error('MESON_SKIP_TEST: GDC < 8.0 can not build shared libraries')
endif
endif
diff --git a/test cases/d/4 library versions/meson.build b/test cases/d/4 library versions/meson.build
index cba1458..c745b92 100644
--- a/test cases/d/4 library versions/meson.build
+++ b/test cases/d/4 library versions/meson.build
@@ -2,8 +2,8 @@ project('D library versions', 'd')
dc = meson.get_compiler('d')
if dc.get_id() == 'gcc'
- if dc.version().version_compare('< 7')
- error('MESON_SKIP_TEST: GDC < 7.0 can not build shared libraries')
+ if dc.version().version_compare('< 8')
+ error('MESON_SKIP_TEST: GDC < 8.0 can not build shared libraries')
endif
endif
diff --git a/test cases/d/7 multilib/meson.build b/test cases/d/7 multilib/meson.build
index 1d9a070..1879c08 100644
--- a/test cases/d/7 multilib/meson.build
+++ b/test cases/d/7 multilib/meson.build
@@ -2,8 +2,8 @@ project('D Multiple Versioned Shared Libraries', 'd')
dc = meson.get_compiler('d')
if dc.get_id() == 'gcc'
- if dc.version().version_compare('< 7')
- error('MESON_SKIP_TEST: GDC < 7.0 can not build shared libraries')
+ if dc.version().version_compare('< 8')
+ error('MESON_SKIP_TEST: GDC < 8.0 can not build shared libraries')
endif
endif
diff --git a/test cases/failing/66 string as link target/meson.build b/test cases/failing/66 string as link target/meson.build
new file mode 100644
index 0000000..cb83fff
--- /dev/null
+++ b/test cases/failing/66 string as link target/meson.build
@@ -0,0 +1,2 @@
+project('string as link argument', 'c')
+executable('myprog', 'prog.c', link_with: [ '' ])
diff --git a/test cases/failing/66 string as link target/prog.c b/test cases/failing/66 string as link target/prog.c
new file mode 100644
index 0000000..0314ff1
--- /dev/null
+++ b/test cases/failing/66 string as link target/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/test cases/frameworks/17 mpi/is_artful.py b/test cases/frameworks/17 mpi/is_artful.py
new file mode 100755
index 0000000..9d4512d
--- /dev/null
+++ b/test cases/frameworks/17 mpi/is_artful.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+# Any exception causes return value to be not zero, which is sufficient.
+
+import sys
+
+fc = open('/etc/apt/sources.list').read()
+if 'artful' not in fc:
+ sys.exit(1)
diff --git a/test cases/frameworks/17 mpi/meson.build b/test cases/frameworks/17 mpi/meson.build
index 5e9bc56..17acd71 100644
--- a/test cases/frameworks/17 mpi/meson.build
+++ b/test cases/frameworks/17 mpi/meson.build
@@ -23,7 +23,15 @@ if build_machine.system() != 'windows'
test('MPI C++', execpp)
endif
-if add_languages('fortran', required : false)
+# OpenMPI is broken with Fortran on Ubuntu Artful.
+# Remove this once the following bug has been fixed:
+#
+# https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1727474
+
+ubudetector = find_program('is_artful.py')
+uburesult = run_command(ubudetector)
+
+if uburesult.returncode() != 0 and add_languages('fortran', required : false)
mpifort = dependency('mpi', language : 'fortran')
exef = executable('exef',
'main.f90',