aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Precompiled-headers.md9
-rw-r--r--docs/markdown/Release-notes-for-0.42.0.md10
-rw-r--r--mesonbuild/build.py2
-rw-r--r--mesonbuild/environment.py7
-rw-r--r--mesonbuild/interpreterbase.py2
-rw-r--r--mesonbuild/modules/__init__.py2
-rwxr-xr-xmesontest.py2
7 files changed, 27 insertions, 7 deletions
diff --git a/docs/markdown/Precompiled-headers.md b/docs/markdown/Precompiled-headers.md
index 8498612..feac7f0 100644
--- a/docs/markdown/Precompiled-headers.md
+++ b/docs/markdown/Precompiled-headers.md
@@ -21,7 +21,14 @@ In Meson, precompiled header files are always per-target. That is, the given pre
Toggling the usage of precompiled headers
--
-If you wish to compile your project without precompiled headers, you can configure it by running Meson with the `--disable-pch` flag. You can also toggle the use of pch in a configured build directory with the GUI tool. You don't have to do any changes to the source code. Typically this is done to test whether your project compiles cleanly without pch (that is, checking that its #includes are in order) and working around compiler bugs.
+If you wish to compile your project without precompiled headers, you
+can change the value of the pch option by passing `-Db_pch=false`
+argument to Meson at configure time or later with `mesonconf`. You can
+also toggle the use of pch in a configured build directory with the
+GUI tool. You don't have to do any changes to the source
+code. Typically this is done to test whether your project compiles
+cleanly without pch (that is, checking that its #includes are in
+order) and working around compiler bugs.
Using precompiled headers with GCC and derivatives
--
diff --git a/docs/markdown/Release-notes-for-0.42.0.md b/docs/markdown/Release-notes-for-0.42.0.md
index ea9d7b1..d6d5365 100644
--- a/docs/markdown/Release-notes-for-0.42.0.md
+++ b/docs/markdown/Release-notes-for-0.42.0.md
@@ -36,3 +36,13 @@ pkg.generate(libraries : libs,
description : 'A simple demo library.',
extra_cflags : '-Dfoo' )
```
+
+## Allow crate type configuration for Rust compiler
+
+Rust targets now take an optional `rust_crate_type` keyword, allowing
+you to set the crate type of the resulting artifact. Valid crate types
+are `dylib` or `cdylib` for shared libraries, and `rlib` or
+`staticlib` for static libraries. For more, see
+Rust's [linkage reference][rust-linkage].
+
+[rust-linkage]: https://doc.rust-lang.org/reference/linkage.html
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index a797e9f..fb56cea 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -825,7 +825,7 @@ You probably should put it in link_with instead.''')
# This is a bit of a hack. We do not want Build to know anything
# about the interpreter so we can't import it and use isinstance.
# This should be reliable enough.
- if hasattr(dep, 'args_frozen'):
+ if hasattr(dep, 'project_args_frozen') or hasattr('global_args_frozen'):
raise InvalidArguments('Tried to use subproject object as a dependency.\n'
'You probably wanted to use a dependency declared in it instead.\n'
'Access it by calling get_variable() on the subproject object.')
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 1e4e04b..07489a1 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -907,7 +907,12 @@ class CrossBuildInfo:
def parse_datafile(self, filename):
config = configparser.ConfigParser()
- config.read(filename)
+ try:
+ f = open(filename, 'r')
+ config.read_file(f, filename)
+ f.close()
+ except FileNotFoundError:
+ raise EnvironmentException('File not found: %s.' % filename)
# This is a bit hackish at the moment.
for s in config.sections():
self.config[s] = {}
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index 7e9fa26..213b2bb 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -65,7 +65,7 @@ class permittedKwargs:
def wrapped(s, node, args, kwargs):
for k in kwargs:
if k not in self.permitted:
- mlog.warning('Passed invalid keyword argument %s. This will become a hard error in the future.' % k)
+ mlog.warning('Passed invalid keyword argument "%s". This will become a hard error in the future.' % k)
return f(s, node, args, kwargs)
return wrapped
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index 9d75525..8b5b210 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -15,7 +15,7 @@ class permittedSnippetKwargs:
def wrapped(s, interpreter, state, args, kwargs):
for k in kwargs:
if k not in self.permitted:
- mlog.warning('Passed invalid keyword argument %s. This will become a hard error in the future.' % k)
+ mlog.warning('Passed invalid keyword argument "%s". This will become a hard error in the future.' % k)
return f(s, interpreter, state, args, kwargs)
return wrapped
diff --git a/mesontest.py b/mesontest.py
index 7f0d342..8325e69 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -513,8 +513,6 @@ TIMEOUT: %4d
'Tests run by the user, usually something like "under gdb 1000 times".'
if self.is_run:
raise RuntimeError('Can not use run_special after a full run.')
- if os.path.isfile('build.ninja'):
- subprocess.check_call([environment.detect_ninja(), 'all'])
tests = self.get_tests()
if not tests:
return 0