aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-09-16linkers: Make id a class variable for DynamicLinkersDylan Baker1-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.
2020-09-16linkers: Fix argument errorDylan Baker1-1/+1
The name of the argument passed was not the name of the argument used.
2020-09-16envconfig: fix return type of get_env_var_pairDylan Baker1-4/+2
It doesn't return (None, None), it returns just None.
2020-09-15Add support for the CompCert C CompilerSebastian Meyer8-1/+247
* 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>
2020-09-14InternalDependency: Add as_link_whole() methodXavier Claessens8-0/+67
2020-09-15CI: don't update MSYS2 [skip ci]Christoph Reiter1-11/+0
This should use the package database from the installer, from the release choco provides and result in fewer potential changes overall.
2020-09-15CODEOWNERS: add dcbaker for compilers and linkers [skip ci]Dylan Baker1-0/+2
I probably know more about that code than anyone else, so I'm probably the right person to be reviewing stuff in there.
2020-09-13externalproject: Fix typing annotationXavier Claessens1-3/+3
2020-09-13external-project: Add typing annotationXavier Claessens2-11/+25
2020-09-13external-project: New module to build configure/make projectsXavier Claessens20-19/+654
This adds an experimental meson module to build projects with other build systems. Closes: #4316
2020-09-13Allow installing dir from build dirXavier Claessens2-2/+8
2020-09-13mcompile: Add some basic XCode supportNirbheek Chauhan2-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.
2020-09-13Improve regexp for MSVC target arch detection againTamás Bálint Misius1-1/+1
2020-09-13Remove redudant checks in vs2010 backendVili Väinölä1-6/+3
- Implicit include dirs was checked twice in a row - Add define only if it does not yet exist rather than remove.
2020-09-13Add VS include directories to projects as wellVili Väinölä1-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.
2020-09-11unit tests: Print total time taken for running testsNirbheek Chauhan1-2/+6
2020-09-11unit tests: Don't use pytest when running single testsNirbheek Chauhan1-10/+31
On my machine this spawns 24 processes and then runs like the single test I asked it to run. With this change, running a single test goes from 7 seconds to less than a second.
2020-09-11Add build machine compilers to project tests compiler reportJon Turney2-6/+31
When cross-compiling, also report build machine compilers in the compiler report produced by run_project_tests.py
2020-09-11Add a test run of MSVC ARM64 cross on Windows x64Jon Turney5-5/+52
Add a cross-file for MSVC UWP ARM64. Bump cidata tag to get an updated install.ps1 script (run by run.ps1) which sets the vcvars environment correctly when cross-compiling. Since arranging the correct environment for simultaneous cross and native 'cl' use is hard, this is test run uses '--cross-only' so we don't require a native compiler. Extend '--cross-only' so it also explicitly uses a machine file which makes all build machine compilers unusable.
2020-09-11Fix test 'common/122 llvm ir and assembly' for Windows ARMJon Turney3-10/+59
2020-09-11Skip test 'common/121 shared modules' on Windows UWPJon Turney1-1/+19
2020-09-11Store first line of VisualStudio compiler output as full_versionJon Turney1-1/+1
Store the first line of VisualStudio compiler output as full_version, so it gets output when we report compiler details.
2020-09-11Revert "Do not automatically set warning flags if buildtype is 'plain'"Eli Schwartz1-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
2020-09-10msubprojects: Allow comma separated list of typesXavier Claessens4-11/+20
2020-09-10msubprojects: Fix review commentsXavier Claessens2-4/+10
2020-09-10git: Use Popen_safe to avoid encoding issuesXavier Claessens2-44/+48
2020-09-10Move verbose_git() and quiet_git() to mesonlibXavier Claessens2-18/+17
2020-09-10mesonlib: Move MesonException declaration to the topXavier Claessens1-13/+11
2020-09-10doc: Update new `meson subprojects` behaviorsXavier Claessens2-12/+63
2020-09-10msubprojects: Rework update commandXavier Claessens1-52/+96
Besides refactoring code into smaller functions: - Makes the --rebase behaviour the default for consistency: it was already rebasing when current branch and revision are the same, it is less confusing to rebase when they are different too. - Add --reset mode that checkout the new branch and hard reset that branch to remote commit. This new mode guarantees that every subproject are exactly at the wrap's revision. - Local changes are always stashed first to avoid any data loss. In the worst case scenario the user can always check reflog and stash list to rollback. Fixes: #7526
2020-09-10msubprojects: Return failure if some commands failedXavier Claessens1-23/+39
If the command fails on some subprojects continue with the rest but return non-0 code. This is useful for CI scripts to ensure it tests latest code instead of old cached code in case of network error or something.
2020-09-10msubprojects: Stash changes before checkoutXavier Claessens1-0/+3
2020-09-10msubprojects: Support git subprojects with no wrap fileXavier Claessens2-0/+19
User could have cloned manually a subproject.
2020-09-10msubprojects: Use less cryptic "git branch --show-current" commandXavier Claessens1-3/+3
It describes well what it does, compared to obscure "rev-parse".
2020-09-10msubprojects: Add --type argumentXavier Claessens1-0/+5
It is often desired to only update git repositories and not pull files from wrapdb.
2020-09-10msubprojects: Use wrap.Resolver() to load all PackageDefinitionXavier Claessens1-21/+16
Besides being simpler, it has the advantage of picking directories that don't have a .wrap file assotiated.
2020-09-10minstall: Add version field to install dataNirbheek Chauhan3-9/+17
And check the install data in the same way that mtest checks serialisation data. Fixes https://github.com/mesonbuild/meson/issues/2354
2020-09-10mtest: Refactor test data checkingNirbheek Chauhan1-21/+12
2020-09-10mtest: Check version in the test data after loadingNirbheek Chauhan3-16/+34
Same as coredata.dat and build.dat loading. Also, do not assert if things change. Raise the appropriate exception. Fixes https://github.com/mesonbuild/meson/issues/7613
2020-09-10Add a test run in an environment which only has a cross compilerJon Turney3-5/+29
Add '--cross-only' option to run_tests.py, so we can arrange not to run tests in the 'native' suite when only a cross-compiler is available, as they can't succeed.
2020-09-10Add release note snippetJon Turney1-0/+4
2020-09-10Split tests out from 'common' which require a native compilerJon Turney56-34/+131
Split out tests (and parts of tests) which require a native compiler from the 'common' suite to a new suite called 'native', so we can selectively avoid running those tests when only a cross-compiler is available. Also move test '211 cmake module' to 'cmake' suite, since it appears that the way we use cmake requires a native compiler.
2020-09-10Identify machine in error accesing compiler object for missing languageJon Turney3-1/+10
Also add a failing test case for that error.
2020-09-10ninja: Generate all STATIC_LINKER rulesJon Turney1-2/+5
Don't stop generating STATIC_LINKER rules at the first MachineChoice which isn't available (i.e. generate a STATIC_LINKER rule, even if STATIC_LINKER_FOR_BUILD isn't needed) Also warn about internal errors which lead to non-existent rule references, rather than exploding with a KeyError.
2020-09-10Don't require build machine compilers for project() languagesJon Turney2-6/+16
This means that, in the common case of a simple meson.build which doesn't contain any 'native: true' targets, we won't require a native compiler when cross-compiling, without needing any changes in the meson.build.
2020-09-10cmake: fix shared_module dependency (fixes #7715)Daniel Mensinger7-0/+250
2020-09-09Merge pull request #7657 from mensinda/moreTypingDylan Baker80-639/+834
typing: Strict type annotations
2020-09-09Merge pull request #7428 from jon-turney/introspector-add-languagesJussi Pakkanen3-12/+31
Handle add_languages(native:) in introspector
2020-09-09Add a test of add_languages(native:) introspectionJon Turney2-0/+10
If the meson.build doesn't use a native compiler, the native compiler options (e.g. 'c_args') shouldn't be present in the output of 'meson introspect --buildoptions'.
2020-09-09Implement add_languages(native:) in introspectorJon Turney1-2/+7