Commit Graph

58 Commits

Author SHA1 Message Date
233afde4cc add loongarch support 2021-02-06 15:16:04 +00:00
39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
0076db6ff9 move get_env_var_pair to environment
This is only used in environment, so it should live there too.
2021-01-11 11:15:07 -08:00
f3fcbba1f8 boost: default machine file properties to env var values
This both moves the env reading to configuration time, which is useful,
and also simplifies the implementation of the boost dependency. The
simplification comes from being able to delete basically duplicated code
since the values will be in the Properties if they exist at all.
2021-01-11 11:15:07 -08:00
e7a5c75285 Move BinaryTable environment lookups to Environment
This means that all the env lookups are done once, at initial configure
time. This has all of the expected advantages.
2021-01-11 11:15:07 -08:00
38c7a7590c pull env to program mappings out of BinaryType class
These really aren't pivotal to that class, and they're used outside of
it. In a follow up patch they're not going to be used inside it at all.
2021-01-11 11:15:07 -08:00
d27bad7d6d Merge pull request #8011 from dcbaker/submit/post-python36-cleanups
Python 3.6 cleanups
2020-11-22 04:28:19 +02:00
954219f39e envconfig: use debug for "using * from environment variables messages
These are spammy, and being in the debug log is probably better anyway.
2020-11-21 07:55:10 -08:00
f6672c7a19 use real pathlib module
We added the _pathlib module to work around defeciencies in python 3.5's
implementation, since we now rely on 3.6 lets drop this
2020-11-20 15:08:40 -08:00
7e58f33376 cmake: Add cross compilation support 2020-10-13 17:04:19 +02:00
a4a53237f1 envconfig: fix return type of get_env_var_pair
It doesn't return (None, None), it returns just None.
2020-09-16 01:32:19 +03:00
9d338200da external-project: New module to build configure/make projects
This adds an experimental meson module to build projects with other
build systems.

Closes: #4316
2020-09-13 13:54:47 -04:00
4253bf6281 typing: Fix code review 2020-09-08 20:15:59 +02:00
e681235e5f typing: fix code review 2020-09-08 20:15:58 +02:00
ca1878ffb5 typing: fix envconfig typing 2020-09-08 20:15:57 +02:00
0710ad18d9 Be stricter when detecting Windows/Cygwin
This removes the check for "mingw" for platform.system(). The only case I know
where "mingw" is return is if using a msys Python under a msys2 mingw environment.
This combination is not really supported by meson and will result in weird errors,
so remove the check.

The second change is checking sys.platform for cygwin instead of platform.system().
The former is document to return "cygwin", while the latter is not and just
returns uname().

While under Cygwin it uname() always starts with "cygwin" it's not hardcoded in MSYS2
and starts with the environment name. Using sys.platform is safer here.

Fixes #7552
2020-08-30 23:37:46 +03:00
601789cc7c machine-files: deprecate the paths section 2020-08-01 22:00:06 -07:00
1c8731a100 envconfig: Add [constants] section in machine files
Machine files already supports `+` operator as an implementation detail,
since it's using eval(). Now make it an officially supported feature and
add a way to define constants that are used while evaluating an entry
value.
2020-06-29 20:16:21 +03:00
b384f82b9a envconfig: Add support SuperH SH-4
Fixes: #7358
2020-06-19 10:56:09 -07:00
71d68a940b Updated to resolve issue identifying SGI CPUs on IRIX systems 2020-06-10 22:16:14 +03:00
630a003746 Add AVR to cpu families. Closes #7085. 2020-05-11 14:56:56 -07:00
247eecc8fc envconfig: Always honor PKG_CONFIG_PATH
The comment for this code is correct, but the code itself isn't. The way
it's implemented in a cross compile we don't look at PKG_CONFIG_PATH at
all.

Fixes: #7062
2020-05-07 00:01:33 +03:00
c53b637959 switch python2 %s for python3 .format 2020-04-21 00:16:21 +03:00
a441836773 Recognize Hurd as platform/OS 2020-04-10 11:29:35 -07:00
7924e5f9c2 Revert "Naturally use env vars a bit more to match Autoconf"
This reverts commit 097dfc085e.
2020-03-23 18:07:24 +02:00
097dfc085e Naturally use env vars a bit more to match Autoconf
PR #6363 made it so our interpretation of env vars no longer clashed
with Autoconf's: if both Meson and Autoconf would read and env var, both
would do the same things with the value they read.

However, there were still cases that autoconf would read an env var when
meson wouldn't:

 - Autoconf would use `CC` in cross builds too

 - Autoconf would use `CC_FOR_BUILD` in native builds too.

There's no reason Meson can't also do this--if native cross files
overwrite rather than replace env vars, cross files can also overwrite
rather than replace env vars.

Because variables like `CC` are so ubiquitous, and because ignoring them
in cross builds just makes those builds liable to break (and things more
complicated in general), we bring Meson's behavior in line with
Autoconf's.
2020-03-23 17:51:36 +02:00
3a4388e51d Fix legacy env var support with cross
Fix #3969
2020-03-23 17:51:36 +02:00
7460292810 -Add xc16 and c2000 C,Cpp toolchain support 2020-03-21 00:47:24 +02:00
9074c7f8a4 envconfig: Make compiler and linker environment variables match 2020-03-17 10:40:39 -07:00
8c1221b437 Add m68k to known cpus for Motorola 68000 series processors
Fixes #6492
2020-01-23 00:20:01 +02:00
730a7b296f environment: Replace LD with <LANG>LD
The rust code is ugly, because rust is annoying. It doesn't invoke a
linker directly (unless that linker is link.exe or lld-link.exe),
instead it invokes the C compiler (gcc or clang usually) to do it's
linking. Meson doesn't have good abstractions for this, though we
probably should because some of the D compilers do the same thing.
Either that or we should just call the c compiler directly, like vala
does.

This changes the public interface for meson, which we don't do unless we
absolutely have to. In this case I think we need to do it. A fair number
of projects have already been using 'ld' in their cross/native files to
get the ld binary and call it directly in custom_targets or generators,
and we broke that. While we could hit this problem again names like
`c_ld` and `cpp_ld` are far less likely to cause collisions than `ld`.
Additionally this gives a way to set the linker on a per-compiler basis,
which is probably in itself very useful.

Fixes #6442
2020-01-22 23:39:33 +02:00
958df63dac envconfig: add pkg_config_libdir property
In order to unify the use of sysroot in the cross-file,
the pkg_config_libdir can now be passed directly in the file.
2020-01-22 15:42:13 -05:00
b092aaff06 envconfig: s390x is 64bit
s390 is the 31/32bit variant, s390x is the 64 bit.
2020-01-15 09:56:13 -08:00
3b691a89bd Add s390 to list of known architectures
Fixes #6411
2020-01-15 09:56:13 -08:00
09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
ef9aeb188e Allow selecting the dynamic linker
This uses the normal meson mechanisms, an LD environment variable or via
cross/native files.

Fixes: #6057
2019-12-02 16:39:06 -08:00
f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
80ec5e9d28 Fix all flake8 warnings 2019-10-20 17:44:43 +03:00
20519a0e1a envconfig: Add Alpha CPU family 2019-10-15 21:47:58 +03:00
2dd5e695c7 envconfig: Add MicroBlaze CPU family
Add the CPU family for the MicroBlaze processor.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
2019-09-26 20:28:42 +03:00
75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
fe645a0a9e envconfig: make MachineInfo.is_windows and is_cygwin match mesonlib
The mesonlib versions are slightly more specific in what they accept.
2019-08-27 21:07:12 +03:00
d3a7537346 envconfig: Add missing MachineInfo is_<os> methods
mesonlib defines is_sunos, is_dragonflybsd, and is_freebsd, which
MachineInfo does not. This should be corrected.
2019-08-27 21:07:12 +03:00
nia
e085aa089f NetBSD detection in envconfig.MachineInfo 2019-08-23 13:10:25 -07:00
f41bdae368 Add basic Webassembly support via Emscripten. 2019-08-05 19:31:32 +03:00
324c5b9aae check that compiler name is not blank or empty
pep8
2019-07-06 00:28:58 +03:00
0bf5c27b64 env: Do not return empty tool env vars
A compiler or other tool with an empty string as name does not make
sense as it anyway can not be used and causes a failure later in
parse_entry.

Fix #5451
2019-07-05 20:58:33 +03:00
3b17344b11 tvOS: added support AppleTVOS 2019-06-13 21:31:03 +03:00
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
ae9a6417fe envconfig: mingw is also Windows
Also change the same idiom for Darwin to use a set().
2019-05-02 14:03:08 -07:00