summaryrefslogtreecommitdiff
path: root/mesonbuild
Commit message (Collapse)AuthorAgeFilesLines
* compilers/mixins/islinker: Make type safeDylan Baker2020-09-241-0/+4
|
* compilers/mixins/intel: make type safeDylan Baker2020-09-241-11/+22
|
* compilers/mixins/intel: Use the has_func_attribute_extra_args functionDylan Baker2020-09-242-1/+6
| | | | Instead of putting that extra argument in the base compiles() class
* compilers/mixins/emscripten: make type safeDylan Baker2020-09-241-4/+11
|
* compilers/mixins/elbrus: make type safeDylan Baker2020-09-241-1/+5
|
* compilers/mixins: make compcert type safeDylan Baker2020-09-241-2/+6
|
* compilers/mixins/clang: Make type safeDylan Baker2020-09-242-5/+24
|
* compilers/mixings/gnu: make type safeDylan Baker2020-09-241-11/+34
|
* compilers/mixins/clike: fix mypy issuesDylan Baker2020-09-244-149/+301
|
* compilers/mixins/ccrx: make mypy safeDylan Baker2020-09-241-1/+6
|
* compilers/mixins/c2000: Make mypy safeDylan Baker2020-09-241-1/+6
|
* compilers/mixins/arm: make type safeDylan Baker2020-09-241-26/+24
|
* compilers/compilers: Fully type annotateDylan Baker2020-09-245-167/+264
|
* ast/introspection: Fix typing violation due to untyped functionsDylan Baker2020-09-241-7/+8
| | | | | When we add type annotations to this in compilers this will break, unless we've already filtered out the non-string arguments.
* compilers: Use a distinct type for compile/link resultsDylan Baker2020-09-245-29/+42
| | | | | | | Currently we do some crazy hackery where we add extra properties to a Popen object and return that. That's crazy. Especially since some of our hackery is to delete attributes off of the Popen we don't want. Instead, let's just have a discrete type that has exactly the properties we want.
* pylint: turn on bad-indentation errorDylan Baker2020-09-225-30/+30
| | | | and fix all of the bad indentation
* pylint: Turn on warnings for incorrect number of argsDylan Baker2020-09-222-5/+5
| | | | | | | | | This catches some very real errors. The one in scalapack is pretty silly actually, it's failing to figure out that the exploded list is at least two arguments. However, the code is actually clearer by not using a list and exploding it, so I've done that and pylint is happy too.
* pylint: Catch cases of `if len(container)` which should be replaced by `if ↵Dylan Baker2020-09-182-2/+2
| | | | | | | container` Unfortunately this doesn't catch other abuses of len(continauer) like, `len(container) <comparator> 0`, see: https://github.com/PyCQA/pylint/issues/3751
* Some fixes for CompCertSebastian Meyer2020-09-182-4/+4
| | | | | | | | | | | | | | 1. Like with gcc's `ld`, also use the `group_start` code to create a `--start-group`/`--end-group` 2. xc16 tricked into believing the 'link_whole' was about `--*-group`, but it should use gcc's `--whole-archive` instead. 3. Not clear what the get_lib_prefix should really do, but for picolibc it seems I want just `''`. The problem with picolibc was that the `-l` would be prefixed to a lib like `picolib/libm/libm.a`. Though of course the `-l` would be necessary for just a plain `m` (that's what I assumed this would be used for). I think this might need some clarification from the meson devs ;-)
* Support identifying msvc dependency prefix with a path starting with a backslashMartin Storsjö2020-09-181-2/+7
|
* msubprojects: Fix unit tests on WindowsXavier Claessens2020-09-181-1/+2
|
* msubprojects: Revert back to rev-parse instead of --show-currentXavier Claessens2020-09-181-1/+3
| | | | | It is undocumented in manpage, but --show-current is new in git 2.22 which is too recent for distros we want to support like Ubuntu 18.04.
* msubprojects: Stop trying to guess subproject typeXavier Claessens2020-09-182-15/+3
| | | | | | | | It was done to include them in `meson subprojects foreach` without --types argument, but it's better to special case missing --types and include wraps that have type=None too. It was a bad idea because that was messing them in `meson subprojects update`, now they are ignored by that command.
* msubprojects: Avoid useless "no local changes to save" messageXavier Claessens2020-09-181-3/+7
|
* msubprojects: Fix checkout of new tag/branchXavier Claessens2020-09-181-4/+9
| | | | | | If revision is a tag that does not exist locally, `git fetch origin <revision>` won't create it and checkout will fail. Using --refmap ensures that references exists locally.
* msubprojects: Fix --types default valueXavier Claessens2020-09-181-3/+5
|
* backends: Treat build target as generator only when it's the first argNirbheek Chauhan2020-09-173-5/+7
| | | | | Otherwise it might be an argument to a script that just inspects the binary itself.
* Revert "windows: reduce chance of going over path limit in backend/vs"Nirbheek Chauhan2020-09-171-5/+4
| | | | This reverts commit 807f88739ebfa002c9a0b9acd3e24c9610fb02a2.
* windows: reduce chance of going over path limit in backend/vsPeter Harris2020-09-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with vs2019 (not ninja), a path length error will be thrown if the path to a resource file is even remotely deep within the tree. This is largely because the target name includes the string "Windows resource for file 'full path'", which is then expanded twice (once for the .vcxproj itself, and once for IntDir) and added to the full path. When combined with the tiny path limits on Windows, it is easy to exceed path limits. This error is largely avoided by the ninja back-end. Unlike the vs back-end, the ninja back-end does not use target.get_id() as part of the project file path, nor does it use target.get_id() as part of get_target_private_dir(). Example error: error MSB4184: The expression "[MSBuild]::NormalizePath( C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp, f3f7317@@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\, f3f7317@@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus. vcxproj.CopyComplete)" cannot be evaluated. Path: C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp\f3f7317 @@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\f3f7317 @@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus. vcxproj.CopyComplete exceeds the OS max path limit. The fully qualified file name must be less than 260 characters.
* Canonicalize target architectures aarch64/armv* into arm64/arm for MSVC toolsMartin Storsjö2020-09-171-0/+4
| | | | | | If the architectures are taken from the output of "clang-cl --version", we need to convert these names into names that the MSVC tools accept as the -machine: parameter.
* Fixed MacOS dylib custom targets not marked as linkableMarco Mastropaolo2020-09-171-1/+1
|
* linkers: fully type annotate and fix mypy issuesDylan Baker2020-09-161-6/+24
| | | | | This makes GnuDynamicLinker not suitable for instantiation, so the tests need to be changed to use the BFD class.
* linkers/compilers: Move an emscripten method to the compilerDylan Baker2020-09-162-7/+7
| | | | This needed an attribute the linker doesn't have.
* linkers: Make id a class variable for DynamicLinkersDylan Baker2020-09-161-33/+48
| | | | | | | | Originally I had this idea that you'd be able to pass the id in to be able to deduplicate some cases (like ld.gold and ld.bfd). That went away because it ended up being really un-dry, but this id per instance remained. Getting rid of it allows us to get rid of a bunch of otherwise useless super calls, which makes adding type annotations easier.
* linkers: Fix argument errorDylan Baker2020-09-161-1/+1
| | | | The name of the argument passed was not the name of the argument used.
* envconfig: fix return type of get_env_var_pairDylan Baker2020-09-161-4/+2
| | | | It doesn't return (None, None), it returns just None.
* Add support for the CompCert C CompilerSebastian Meyer2020-09-155-1/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add preliminary support for the CompCert C Compiler The intention is to use this with the picolibc, so some GCC flags are automatically filtered. Since CompCert uses GCC is for linking, those GCC-linker flags which are used by picolibc, are automatically prefixed with '-WUl', so that they're passed to GCC. Squashed commit of the following: commit 4e0ad66dca9de301d2e41e74aea4142afbd1da7d Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 14:20:39 2020 +0200 remove '-fall' from default arguments, also filter -ftls-model=.* commit 41afa3ccc62ae72824eb319cb8b34b7e6693cb67 Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 14:13:55 2020 +0200 use regex for filtering ccomp args commit d68d242d0ad22f8bf53923ce849da9b86b696a75 Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 13:54:36 2020 +0200 filter some gcc arguments commit 982a01756266bddbbd211c54e8dbfa2f43dec38f Author: Sebastian Meyer <meyer@absint.com> Date: Fri Aug 28 15:03:14 2020 +0200 fix ccomp meson configuration commit dce0bea00b1caa094b1ed0c6c77cf6c12f0f58d9 Author: Sebastian Meyer <meyer@absint.com> Date: Thu Aug 27 13:02:19 2020 +0200 add CompCert to meson (does not fully work, yet) * remove unused import and s/cls/self/ fixes the two obvious LGTM warnings * CompCert: Do not ignore unsupported GCC flags Some are safe to ignore, however, as per https://github.com/mesonbuild/meson/pull/7674, they should not be ignored by meson itself. Instead the meson.build should take care to select only those which are actually supported by the compiler. * remove unused variable * Only add arguments once. * Apply suggestions from code review Co-authored-by: Dylan Baker <dylan@pnwbakers.com> * Remove erroneous ' ' from '-o {}'.format() As noticed by @dcbaker * added release note snippet for compcert * properly split parameters As suggested by @dcbaker, these parameters should be properly split into multiple strings. Co-authored-by: Dylan Baker <dylan@pnwbakers.com> * Update add_compcert_compiler.md Added a sentence about the state of the implementation (experimental); use proper markdown * properly separate arguments Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
* InternalDependency: Add as_link_whole() methodXavier Claessens2020-09-142-0/+15
|
* externalproject: Fix typing annotationXavier Claessens2020-09-131-3/+3
|
* external-project: Add typing annotationXavier Claessens2020-09-132-11/+25
|
* external-project: New module to build configure/make projectsXavier Claessens2020-09-137-19/+386
| | | | | | | This adds an experimental meson module to build projects with other build systems. Closes: #4316
* Allow installing dir from build dirXavier Claessens2020-09-132-2/+8
|
* mcompile: Add some basic XCode supportNirbheek Chauhan2020-09-132-1/+49
| | | | | | I wrote this to convert run_tests.get_backend_commands() over to the new meson wrappers, but that turned out to be harder than I expected, so just splitting this out for now.
* Improve regexp for MSVC target arch detection againTamás Bálint Misius2020-09-131-1/+1
|
* Remove redudant checks in vs2010 backendVili Väinölä2020-09-131-6/+3
| | | | | - Implicit include dirs was checked twice in a row - Add define only if it does not yet exist rather than remove.
* Add VS include directories to projects as wellVili Väinölä2020-09-131-2/+3
| | | | | | - "Go To Document" action previously only worked on c/cpp files which had the include directories set but it was not possible to move from header to another header.
* Store first line of VisualStudio compiler output as full_versionJon Turney2020-09-111-1/+1
| | | | | Store the first line of VisualStudio compiler output as full_version, so it gets output when we report compiler details.
* Revert "Do not automatically set warning flags if buildtype is 'plain'"Eli Schwartz2020-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8ee1c9a07a3a35e3ed262fbc358fd86c257a966e. No rationale was given for this change prior to merging. After the fact it was described as desired by distro packagers, however as a distro packager I believe this commit hurts me. From a distro packaging perspective, we primarily care about one thing: previously building code should still build. Hence, -Werror is bad for our use case. meson handles this via -D werror which is different from -D warning_level and as long as the former is disabled, warnings in the build do not cause harm (but may attract review attention for upstream to fix). buildtype is a completely unrelated concern, and the intention for =plain is to disable debug or optimization settings that result in codegen differences and thus different built artifacts. This must not happen in distro builds because the *distributed programs* should conform to policy settings. Unfortunately, completely disabling warnings happens silently, and cannot be overridden even if you really, really believe you know what you're doing. It is thematically broken, since use of add_project_arguments() to add more -W flags is not likewise ignored. But if you try to add -Wall in that manner, meson will lecture you to use warning_level which you cannot do. And if you have custom warning flags which depend on options enabled by judicious use of -Wall via default_options: 'warning_level=1', then you end up with generated warnings complaining about your command line rather than your code, such as: cc1: warning: ‘-Wformat-y2k’ ignored without ‘-Wformat’ [-Wformat-y2k] cc1: warning: ‘-Wformat-extra-args’ ignored without ‘-Wformat’ [-Wformat-extra-args] cc1: warning: ‘-Wformat-zero-length’ ignored without ‘-Wformat’ [-Wformat-zero-length] cc1: warning: ‘-Wformat-contains-nul’ ignored without ‘-Wformat’ [-Wformat-contains-nul] cc1: warning: ‘-Wformat-security’ ignored without ‘-Wformat’ [-Wformat-security] which then break the build with -Werror. Throughout all this, a buildtype of "plain" does *not* disable -D werror=true, which is the part where distro builds actually break down! Users who both wish to disable debug/optimization codegen, *and* disable warning commentary, are encouraged to do so by doing both, not by doing one and having the other be assumed. Fixes #7399
* msubprojects: Allow comma separated list of typesXavier Claessens2020-09-102-6/+13
|
* msubprojects: Fix review commentsXavier Claessens2020-09-101-2/+8
|