Commit Graph

11309 Commits

Author SHA1 Message Date
Eli Schwartz ead4ba7777
run_unittests: fix unused variable warnings
We don't actually want to do anything with the open()ed file, just
immediately close it.

The CalledProcessError doesn't have its return returncode checked
here, even though other code with the same type of context manager does.
2021-08-15 09:36:18 -04:00
Jussi Pakkanen 3340d373fb Revert "interpreter: Fix holder_map not being updated when subproject fails"
This reverts commit 566383c727.
2021-08-15 13:18:35 +03:00
Jussi Pakkanen a90d2925dd Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"
This reverts commit 0b97d58548.
2021-08-15 13:18:35 +03:00
Eli Schwartz 00bfbcbfa2 tests: make detecting broken compilers always run without tracebacks
Fixes regression in commit 75688240cf.
Even though this function is *currently* only invoked on Windows, these
environment variables may not actually exist -- and apparently don't in
at least the "UnusedMissingReturn / windows" test run, which... did not
get triggered by that commit, since it only edited the testsuite runner,
not any test cases. \o/
2021-08-15 11:35:44 +03:00
Jussi Pakkanen 6c55fc5cb0 Disable Rust + clangcl. 2021-08-15 03:06:01 +03:00
Jussi Pakkanen 75688240cf Disable vs2017 + 32bit Rust combo as it is broken. 2021-08-15 00:31:18 +03:00
Jussi Pakkanen 9ab12ca85e Force unity builds off in Flex test. 2021-08-14 21:32:54 +03:00
Xavier Claessens b74db1dda2 Document that custom_target() install_dir can be a list 2021-08-13 08:18:38 -04:00
Jussi Pakkanen 8c0c92e1a6 Allow gettext test to skip on macOS. 2021-08-12 23:25:33 +03:00
Eli Schwartz e4c50bf8a7
fix the previous commit which deleted a doc file but not the index entry
The CI still passed, or should I say, didn't run, and I failed to notice
this in manual review. Sorry!
2021-08-12 12:43:34 -04:00
Eli Schwartz bf1ae2c7f9
Update wrap documentation to describe new submission process 2021-08-12 12:18:58 -04:00
Jussi Pakkanen cfc0a95c6f Fix building framework test. 2021-08-12 11:54:01 -04:00
Jussi Pakkanen 05d36ee394 Disable asan memory leak checks on a Cuda test. 2021-08-12 01:53:39 +03:00
Jussi Pakkanen 8f5e1649aa Pass a test file to flex test. 2021-08-12 01:53:20 +03:00
Jussi Pakkanen f9d9cb174a Always generate Java rule, it is platform agnostic. 2021-08-11 21:54:54 +03:00
Dylan Baker 0b97d58548 compilers/c++: Add MSVC option to make the __cplusplus define accurate
Otherwise it always returns the value for c++98, starting with MSVC 2017
15.7 or later. Earlier versions are not affected by this mis-feature
2021-08-11 21:54:16 +03:00
Adrien Plazas 042adba204 Make the flex test case work
This adds the noyywrap option so flex doesn't wait for more input once
we reached EOF. This also adds the nounput and noinput options to fix
compilation warnings.

We can now run the test as expected.
2021-08-11 21:47:53 +03:00
Dylan Baker 6a83f8b9cb build: store global and project args per-machine even when not cross compiling
The problem is what happens in this case:
```meson
add_project_arguments('-DHOST', language : 'c', native : false)
add_project_arguments('-DBUILD', langauge : 'c', native : true)
```

The original meson behavior was that in an host == build configuration
only the `native : false` would be applied. This doesn't really make
sense as in that case the build machine is the host machine, so it is
both the native and non-native machine at once. We changed this so that
the both would be applied in a host == build configuration, but this is
a behavioral change, and needs to be reverted.

Fixes: #9037
2021-08-09 19:44:49 -04:00
Dylan Baker 8a7451e051 build: add a few annotations
I was debugging this code, these were trivial, so I added them.
2021-08-09 19:44:49 -04:00
Xavier Claessens 223991c09e Fix i18n target name when using @BASENAME@ and configure_file() input
Fixes: #9022
2021-08-09 19:43:45 -04:00
Eli Schwartz 487d45c1e5
i18n: use real build/install targets for gmo files
Don't just create a .PHONY target which runs a script that magically
generates files ninja doesn't know about. It results in untracked files,
and `meson install` has to run additional commands instead of copying
over files, and then cannot track them to uninstall them later.

I'm not even really sure why it was originally done via a proxy script,
most likely bad legacy design. This is after all one of the oldest
modules...

One side effect of this is that meson doesn't know how to rename
build.CustomTarget files on install (only data files are supported?),
and every file needs to be installed as "domainname.mo" so it must be
named that in-tree too. To prevent clashes, every locale gets its own
locale-specific subdirectory.

Once we are doing that anyway, we can output them to the actual
structure required by the gettext family of functions, and
bindtextdomain() can therefore point to this location if desired. This
might be useful for running localized programs from the build tree.
2021-08-09 18:25:17 -04:00
Xavier Claessens 27b319526c interpreter: Fix spurious warning in configure_data()
This is a regression when porting to typed_pos_args().
2021-08-09 16:42:23 -04:00
Emmanuele Bassi d9acd7505c gnome: Filter all compiler and linker flags
When sending them to the introspection scanner, we must always filter
all compiler and linker flags, because g-ir-scanner does not accept any
random argument but only a specific subset.

Fixes: #8876
2021-08-09 14:43:57 -04:00
GustavoLCR 6a1157b2e5 Fix native targets for vs backend cross compilation 2021-08-09 11:27:10 -07:00
Xavier Claessens 5462ea921f interpreter: Fix missing subsubproject summary when subproject fails
In the case main->subp->subsubp, if subsubp succeed to configure but
subp subsequentially fails, subsubp is still being built but its summary
was missing.
2021-08-09 14:11:42 -04:00
Xavier Claessens 566383c727 interpreter: Fix holder_map not being updated when subproject fails
Fixes: #9038
2021-08-09 14:11:42 -04:00
Xavier Claessens 59478ce2da modules: Fix typo in state.test()
Fixes: #9081
2021-08-09 14:11:09 -04:00
lilinzhe dd2e3bf446 pkg-config: support for `-l:libfoo.a`
fixs: #9000 Meson not correctly process with -l:xxx.a link arguments in pkgconfig .pc file.

see also:https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a

with unit test, unit test will be partially skiped if pkg-config version < 0.28 .
    see: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/blob/master/NEWS
2021-08-09 19:32:48 +02:00
Daniel Mensinger 5c87167a34 interpreter: Fix list contains for Holders (fixes #9020 #9047) 2021-08-09 09:40:35 -04:00
Jussi Pakkanen f2fe271198 Add support for finding Javascript source libraries with Emscripten. 2021-08-08 15:25:48 +03:00
Jussi Pakkanen 108fe84e7e Update iphone cross building. 2021-08-08 14:15:17 +03:00
Xavier Claessens 943596abbb Fix --force-fallack-for with --wrap-mode=nofallback
Fixes: #9065
2021-08-07 11:20:57 +02:00
Xavier Claessens 1dcde9da61 modules: Add API to add test
This fix kwargs not going through typed_kwargs() decorator that sets
defaults.

Fixes: #9009
2021-08-06 15:04:38 -04:00
Stéphane Cerveau 51cbb15335 minstall: restore_selinux_contexts: fix env test
To avoid extra env test, test destdir presence
upper in restore_selinux_contexts
2021-08-06 15:03:29 -04:00
Stéphane Cerveau 2c3a68bc30 install: apply ldconfig at the end of the install
On linux system ldconfig needs to be called to update
the ld.so.cache to be able to load libraries from
/usr/local/lib/x86_64-linux-gnu on debian based
distributions for example.
2021-08-06 15:03:29 -04:00
Stéphane Cerveau 7e8d5207a7 install: update restore_selinux to use popen_safe
Use Popen_safe to simplify the code.
2021-08-06 15:03:29 -04:00
Felix Schwarz 53ce1610a6 fix spelling error in user output ("depencency" -> "dependency") 2021-08-06 09:20:23 -04:00
Dylan Baker 5381ec89af run_mypy: Add interpreter/type_checking to the list of checked modules 2021-08-04 19:09:08 -04:00
Dylan Baker 386b312fa9 interpreterbase/decorators: fix typed_kwargs return type
Because of the convertor function we have no guarantee that what we're
getting is in fact a `Dict[str, TYPE_var]`, it might well be anything in
the values, so we need to do some casting and set the return type to
object. This works out fine in practice as our declared `TypeDict`
inputs in the actual function signatures will be used instead.
2021-08-04 19:09:08 -04:00
Dylan Baker f4a1da0145 interpreterbase/decorators: use a named function for lowering strings
Mypy gets confused by the lambda, so we might as well just use a named
function.
2021-08-04 19:09:08 -04:00
Dylan Baker 2307cbd2ac interpreter/typing: Add some type annotations
We really need PEP464 to annotate many fo thse correctly, but until then
we can manually annotate many of them to fix typing issues.
2021-08-04 19:09:08 -04:00
Dylan Baker d1b52b913f interpreter: split keyword definitions out of the interpreter 2021-08-04 19:09:08 -04:00
Alois Wohlschlager 40d5a38d1b Escape path in exclude filter passed to gcovr
Gcovr interprets exclude filters, as passed to the -e option, as
regexes. Since we want to exclude a raw path, the argument must be
escaped.
2021-08-04 20:31:35 +02:00
Kevin Meagher 3c3fa0a12c add boolean parameter use_system for searching boost
This boolean parameter is added to check_and_set_roots() and detect_lib_dirs()
when true it will first search the compiler library directories before checking
the standard lib directories. This is set to false when using BOOST_ROOT and
set to true when useing other system directories like /usr/local

Also simplify using a set to remove duplicate lib files

Also remove the part where you search the Cellar in homebrew, this is
unnescessary now that symlinks can be followed it should find boost
when searching /usr/local so no need to search the Cellar
2021-08-04 19:29:05 +02:00
Kevin Meagher f781c30700 Make libs a set from the begining 2021-08-04 19:29:05 +02:00
Kevin Meagher 7ce29e1eda Relax restrictions on detecting boost dependency
This does two things:
* allows the library files to be symlinks
* searches `lib` and `lib64` in `BOOST_ROOT` even if it finds lib
  directories from the compiler

The first condition is needed for the homebrew on macOS because boost and boost
python are provided in seperate packages and are put together in /usr/local/lib
with symlinks to the library files. The both conditions are needed for high
performace computing environments where dependencies are often provided in
nonstandard directories with symlinks

A test case was added which looks for boost libraries in seperate directories
which have been symlinked to BOOST_ROOT/lib
2021-08-04 19:29:05 +02:00
Xavier Claessens 9da99e7a59 destdir: Allow relative to build directory
Meson already works like that, except in do_copydir() that requires
absolute destdir. Better explicitly support that instead of leaving it
undefined and unconsistent.
2021-08-04 09:43:41 -04:00
Dylan Baker 630a41eb81 ninjabackend: use get_subdir() instead of subdir attribute for cython
As this works correctly for CustomTarget, CustomTargetIndex, and
GeneratedList, but .subdir doesn't work for CustomTargetIndex.
2021-08-03 14:03:33 -07:00
Dylan Baker bc31c23074 build: Add annotation to CustomTargetIndex.get_subdir 2021-08-03 14:03:33 -07:00
Dylan Baker daf63fc377 build: Add get_subdir() to GeneratedList
It needs this to match the behavior of CustomTarget and
CustomTargetIndex, the later of which doesn't have a subdir attribute,
just `get_subdir()`
2021-08-03 14:03:33 -07:00