Commit Graph

730 Commits

Author SHA1 Message Date
Daniel Mensinger c4f96e00a6 removed the InternalDepdendencyHolder, since it is unused 2019-09-25 08:28:11 -04:00
Xavier Claessens ef3992f1cc configure_file(): Allow multiple inputs in command mode
Closes: #5893
2019-09-17 13:05:40 -04:00
Peter Hutterer 4ebce2c3f2 Add test priorities to force test start order 2019-08-24 21:26:41 +03:00
Dylan Baker 110b562930 Vs backend compiler selection (#5448)
* backends/vs: Only set platform_toolset if it isn't already set

* interpreter: set backend up after the compiler

Otherwise we won't be able to check which VS toolchain to use.

* docs/using-visual-studio: wrap lines

* docs: recommend the py launcher instead of python3 for windows

* set backend.environment when building a dummy version

* backends/vs: Add support for clang-cl with vs2017 and vs2019 backends

* backends/vs: Add support for ICL (19.x) with vs2015 and vs2017 backends
2019-08-24 02:32:56 +03:00
Jussi Pakkanen 3db6dcb3b8 Rerun configuration for all potential input files. Closes #5809. 2019-08-21 20:49:49 +03:00
Jussi Pakkanen 1ea3ddc6ad
Merge pull request #5681 from dcbaker/dynamic-linker-split
split dynamic linker representations from compilers
2019-08-20 23:14:05 +03:00
Rachel Mant f431cff809 Make .extract_objects() work correctly as an input to custom_target 2019-08-17 21:12:56 +03:00
Thibault Saunier edec2ee0ee gnome: Handle overriden g-ir-scanner
When g-ir-scanner is overriden, we can't call it at configure time
but we know what options are avalaible (as it started using meson
after checked options where added) so do not try to call it to retrieve
the version as it will fail.

Also see https://github.com/mesonbuild/meson/issues/3442
2019-08-17 12:07:20 +03:00
Michael Hirsch, Ph.D fd7e8c5400 expand tilde when looking up libraries -Dfoo=~/mylib
It is often desirable to use ~ for home directory in -D compilation args.

Why the transform to pathlib.Path and back to str? Because this is one of many
places where the list(map(str,..))) will be eliminated upon Python 3.6 being
minimum Meson Python requirement.
2019-08-15 23:50:36 +03:00
Dylan Baker c55285351a Interpreter: identify the linker being used, if there is one 2019-08-14 13:13:23 -07:00
James Hilliard b21fd95f73 Add is_disabler function
This is useful if one needs to check if a variable is a disabler.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2019-08-12 01:05:45 +03:00
Jussi Pakkanen 8764e4f579 Print only host platform info in some cases during native builds
Build and target info is confusing in that case. However still log that
information, as it is useful in case something slips out of sync and
needs to be debugged.
2019-08-11 20:38:35 +03:00
Jussi Pakkanen 5fd4963766 Made build. options alias basic ones when native building. 2019-08-06 21:34:15 +03:00
Jussi Pakkanen b739652bc4 Do not print build compiler info when not cross compiling. It is confusing. 2019-08-06 21:34:15 +03:00
Dylan Baker b3ea27f596 interpreter: Fix permitted kwargs in dependency.get_variable
default -> default_value
2019-07-26 12:06:47 +00:00
Xavier Claessens 2e41d53e4d Add version check support to find_program()
Closes: #1609
2019-07-19 08:55:50 -04:00
Daniel Mensinger bc0f510ef1 fix all flake8 issues 2019-07-18 23:43:29 +03:00
Jussi Pakkanen 19cda6b7c9
Merge pull request #5606 from xclaesse/alias_target
Add alias_target() function
2019-07-11 00:34:40 +03:00
Xavier Claessens 12d4031f52 Add alias_target() function 2019-07-10 15:01:18 -04:00
Jussi Pakkanen 724113849c Warn if the user manually adds arguments we have builtin support for. 2019-07-10 01:05:47 +03:00
John Ericson 9149aaba9c `add_{global,project}_{,link_}arguments`: simply native flag behavior
This further simplifies behavior to match the "build vs host" decision
we did with `c_args` vs `build_c_args`. The rules are now simply:

 - `native: true` affects `native: true` targets

 - `native: false` affects `native: false` targets

 - No native flag is the same as `native: false`

I like this because you don't even have to know what "build" and "host"
mean to understand how it works, and it doesn't depend on whether the
overall build is cross or not.

Fixes #4933
2019-06-27 21:24:50 +03:00
Michael Hirsch, Ph.D 5b109c9ad2 correct missing argument for IntelClFortranCompiler
ifort passes all tests

cleanup logic
2019-06-24 14:06:32 -04:00
John Ericson 34c22522f3 Further deduplicate Interpreter native kwarg code
This ensures that invalid arguments properly cause errors, but doesn't
otherwise change semantics
2019-06-12 14:50:51 +03:00
John Ericson 2ddb1af294 Simplify and dedup machine kwarg -> MachineChoice logic in the interpreter 2019-06-09 13:13:29 -04:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04:00
Daniel Mensinger b1bef5ae0d
cmake: removed legacy kwargs from interpreter dict 2019-06-06 18:27:05 +02:00
Daniel Mensinger e02c101575
cmake: moved subprojects into the CMake module 2019-06-06 18:27:05 +02:00
Daniel Mensinger 35936316eb
cmake: rebase fixes 2019-06-06 18:27:04 +02:00
Daniel Mensinger 3d7c50d109
cmake: Added option for additional CMake args 2019-06-06 18:27:03 +02:00
Daniel Mensinger d114d8446e
cmake: Minor fixes 2019-06-06 18:27:03 +02:00
Daniel Mensinger 1041c71eb0
cmake: support object libraries 2019-06-06 18:27:03 +02:00
Daniel Mensinger 2b44b4be9f
cmake: Fixed install prefix 2019-06-06 18:27:02 +02:00
Daniel Mensinger be6a9191e1
cmake: First working version 2019-06-06 18:27:02 +02:00
Daniel Mensinger e55236bde4
cmake: basic AST generation 2019-06-06 18:27:02 +02:00
Daniel Mensinger 8d3bd6eea8
cmake: Server handshake 2019-06-06 18:27:01 +02:00
Daniel Mensinger a9a3b3ffe6
Added method kwarg to subproject 2019-06-06 18:22:26 +02:00
John Ericson af2d7af998 Per machine do 'build.' and '' option prefixes
See the docs/ changes for details.
2019-06-05 23:05:34 -04:00
Mathieu Duponchelle 12a82e763d interpreter: add fallback argument to subproject.get_variable() 2019-05-28 20:26:54 +03:00
Jussi Pakkanen e9bd7d49bd
Merge pull request #5372 from dcbaker/get_variable
Dependency.get_variable method
2019-05-21 21:57:05 +03:00
Jussi Pakkanen 79d530e325 Generators can have extra target dependencies. Closes #4131. 2019-05-20 23:38:13 +03:00
Jussi Pakkanen ef024583df
Merge pull request #5276 from dcbaker/pkg-config-path-invalidate-cache
coredata: add pkg_config_path to depedency cache key
2019-05-20 22:50:12 +03:00
Jon Turney fb35e6faac Remove compiler data from build object
The actual data is in Coredata (which is serialized) and we just held a
reference in Build for (in)convenience.
2019-05-20 11:29:17 -07:00
Jon Turney 58870fda16 Remove compilers from ModuleState object
It doesn't make much sense to have this and not also have
cross-compilers (so any use of this is already pretty suspect as
probably wrong when cross-compiling).

This information is accessible anyhow via environment.coredata.
2019-05-20 11:29:17 -07:00
Dylan Baker 4f347ef14a fixup! interpreter: Add get_variable method to dependency holders 2019-05-20 10:59:18 -07:00
Dylan Baker 146e97e974 Use dependency cache 2019-05-20 10:05:36 -07:00
Jussi Pakkanen 67a5af99aa
Merge pull request #5395 from dcbaker/mtest-annotations
Mtest annotations and bug fixes
2019-05-16 00:31:01 +03:00
John Ericson 957d8e051c Make `PerMachine` and `MachineChoice` have just `build` and `host`
Meson itself *almost* only cares about the build and host platforms. The
exception is it takes a `target_machine` in the cross file and exposes
it to the user; but it doesn't do anything else with it. It's therefore
overkill to put target in `PerMachine` and `MachineChoice`. Instead, we
make a `PerThreeMachine` only for the machine infos.

Additionally fix a few other things that were bugging me in the process:

 - Get rid of `MachineInfos` class. Since `envconfig.py` was created, it
   has no methods that couldn't just got on `PerMachine`

 - Make `default_missing` and `miss_defaulting` work functionally. That
   means we can just locally bind rather than bind as class vars the
   "unfrozen" configuration. This helps prevent bugs where one forgets
   to freeze a configuration.
2019-05-16 00:27:57 +03:00
John Ericson 4030e7cb7a UserOption no longer has a name field.
This avoids the duplication where the option is stored in a dict at its
name, and also contains its own name. In general, the maxim in
programming is things shouldn't know their own name, so removed the name
field just leaving the option's position in the dictionary as its name.
2019-05-15 14:21:47 +03:00
Dylan Baker 502a684872 build: TestSetup doesn't take keyword arguments
This function is currently setup with keyword arguments defaulting to
None. However, it is never called without passing all of it's arguments
explicitly, and only one of it's arguments would actually be valid as
None. So just drop that, and make them all positional. And annotate
them.
2019-05-14 16:43:29 -07:00
Dylan Baker 285db6637d interpreter: annotate the Test class
This is needed for mtest, in a round about way through backends
2019-05-14 16:43:28 -07:00