This partially reverts commit add502c648.
In 'linkshared' test, annotate cppfunc() as imported, so an indirection
through an import stub is generated, avoiding a relocation size error
when building using gcc for Cygwin with LTO on.
Align with the example of how to write this portably in [1].
The 'c' language part of that test already gets this right.
[1] http://gcc.gnu.org/wiki/Visibility
This is so dumb, we can just insert C for you without you having to know
that you're using C under the hood. This is nicer because:
1) Meson doesn't make the user add a language they're not explicitly
using
2) If there was ever an implementaiton of Vala that didn't use C as
it's assembly language, this wouldn't make any sense.
The build level shouldn't be deal with interpreter objects, by the time
they leave the intpreter they should be in the Meson middle layer
representaiton
We need to escape space in variables that gets into cflags or libs
because otherwise we cannot split compiler args when paths contains
spaces. But custom variables are unlikely to be path that gets used in
cflags/libs, and escaping them cause regression in GStreamer that use
space as separator in a list variable.
* Allow address sanitizer for Visual Studio 2019 version 16.9
Address Sanitizer was first supported with the current syntax in Visual
Studio 16.9.0 (cl version 19.28.29910).
* VS: Convert /fsanitize=address to project file setting
install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
relying on that behaviour, but it has always been broken in the case the
source or build directory contains spaces.
Fix this by changing get_include_args() to substitue paths directly
which will then get escaped correctly.
Add a unit test that builds GObject documentation which is where this
issue has been spotted.
Fixes: #8744
With this change File objects created with the builtin files() function
can be used with the fs submodule like normal strings.
All methods that seem reasonable support FileOrSting arguments.
For example fs.exists() still only takes str arguments because meson
already ensures that File objects do exist when creating them with files().
Each user facing function of the fs module has an additional FeatureNew
check when used with File objects.
The test cases for fs are extended appropriately with tests for File objects.
Cross-compiling and generating gobject-introspection isn't trivial, but
with wrapper scripts that call qemu-user it's perfectly doable[1].
Currently looking up the gobject-introspection pkgconfig is done as a
native dependency, which means in cross-compilation environments this
is not the right paths (wrong library path, for example).
Solve this by generalisiing _get_native_dep() to _get_dep(native) and
asking for the host gobject-introspection instead.
[1] https://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-gnome/gobject-introspection/
This is just forcing the usage of -include as c_args, even though this
particular case can happen easily when this is provided via a dependency
cflags.
We also ensure that both the headers are included by using locale
definitions.
When pch are used for a target meson will make the compiler to include
the pre-compiled header. While this is useful, this needs to happen
before any other header has been included, otherwise:
1) we won't take advantage of pch for anything else previously included
2) gcc will just fail as it won't even try to look for a pre-compiled
header in this case [1]
This case can happen quite a easily when a dependency provides an
included header in its cflags.
As per this, split _generate_single_compile() in two phases, one is
responsible of initializing the compiler data, while the other is
defining commands for the context.
In this way, when pch can be used, we can insert the pch inclusion
earlier than any other provided by the target.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100462
If an invalid resource path is specified, then an uncaught python
exception occurs, and a backtrace is shown. Throw a MesonException
instead to produce a cleaner error message.
Add myself as a maintainer of these files since I'll be keeping them
in sync with the Vim repository.
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
This gets rid of compile warnings, and simplifies the code.
Note that `work_dir` in sanity_check_impl was incorrect,
it was used both to prepend to file names and as cwd=work_dir
argument to Popen. This is fixed here.
Closes gh-7344
This now gives a clear error rather than silently passes for
unrecognized categories, like:
python run_project_tests.py --only nonexisting
or
python run_project_tests.py --only objc # should be 'objective c'