aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/envconfig.py
AgeCommit message (Collapse)AuthorFilesLines
2022-09-01env2mfile: reuse logical lists of interesting facts from meson itselfEli Schwartz1-1/+6
Meson internally knows about many languages and tools, and *FLAGS variables, and which languages to use them for. Instead of duplicating this logic, import it from mesonbuild.* This logic was originally standalone, but now that it is merged into the Meson tree we can have a single source of truth.
2022-08-30Add LLVM_CONFIG supportSamay Sharma1-0/+1
2022-08-04cmake: Change assertion into a more useful error (fixes #9925)Daniel Mensinger1-1/+2
2022-07-31envconfig: add more binutils variablesArtturin1-1/+10
follow standard variables and allow distributions to remove some entries from their cross-files ex: https://github.com/void-linux/void-packages/blob/f23acdd24bfade3a4e14809fafaffe09b3c3c318/common/build-style/meson.sh#L50-L54 variables chosen from the variables nixos sets https://github.com/NixOS/nixpkgs/blob/ea0f14a502c60223c96066de3ed548cb3be8ca47/pkgs/build-support/bintools-wrapper/setup-hook.sh#L58 sorted alphabetically
2022-03-22envconfig: use $PKG_CONFIG for pkg-config find_program as well as pkgconfigDylan Baker1-0/+1
It looks like internally we use pkgconfig, even though the installed name is pkg-config. This fixes `tests cases/common/44 pkgconfig-gen`, which will ignore PKG_CONFIG and select the wrong pkg-config binary if you have $PKG_CONFIG set.
2022-03-07treewide: string-quote the first argument to T.castEli Schwartz1-1/+1
Using future annotations, type annotations become strings at runtime and don't impact performance. This is not possible to do with T.cast though, because it is a function argument instead of an annotation. Quote the type argument everywhere in order to have the same effect as future annotations. This also allows linters to better detect in some cases that a given import is typing-only.
2022-02-02Genericise TI compiler and add MSP430 supportWilliam Toohey1-0/+1
2022-01-10first pass at migrating to dataclassesEli Schwartz1-19/+8
In some cases, init variables that accept None as a sentinel and immediately overwrite with [], are migrated to dataclass field factories. \o/ Note: dataclasses by default cannot provide eq methods, as they then become unhashable. In the future we may wish to opt into declaring them frozen, instead/additionally.
2021-12-17add ft32 cpu familyRafael Silva1-0/+1
2021-11-01modules/gnome: use envconfig for VAPIGENDylan Baker1-0/+1
we have a mechanism for doing "this could be an environment variable" let's use that.
2021-10-25Add sccache support.Jussi Pakkanen1-0/+19
2021-06-18holders: Introduce HoldableObjectDaniel Mensinger1-2/+2
2021-05-18add cpu family cskyRandy Yates1-0/+1
2021-04-12dependency: Add JDK system dependencyTristan Partin1-4/+8
The JDK system dependency is important for detecting JDK include paths that may be useful when developing a JNI interface.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-5/+5
performed by running "pyupgrade --py36-plus" and committing the results
2021-02-06add loongarch supportXiaotian Wu1-0/+2
2021-01-13Fix misspellsAntonin Décimo1-3/+3
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-11move get_env_var_pair to environmentDylan Baker1-34/+2
This is only used in environment, so it should live there too.
2021-01-11boost: default machine file properties to env var valuesDylan Baker1-8/+0
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-11Move BinaryTable environment lookups to EnvironmentDylan Baker1-42/+21
This means that all the env lookups are done once, at initial configure time. This has all of the expected advantages.
2021-01-11pull env to program mappings out of BinaryType classDylan Baker1-45/+45
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.
2020-11-22Merge pull request #8011 from dcbaker/submit/post-python36-cleanupsJussi Pakkanen1-1/+1
Python 3.6 cleanups
2020-11-21envconfig: use debug for "using * from environment variables messagesDylan Baker1-1/+1
These are spammy, and being in the debug log is probably better anyway.
2020-11-20use real pathlib moduleDylan Baker1-1/+1
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-10-13cmake: Add cross compilation supportDaniel Mensinger1-13/+84
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-13external-project: New module to build configure/make projectsXavier Claessens1-0/+1
This adds an experimental meson module to build projects with other build systems. Closes: #4316
2020-09-08typing: Fix code reviewDaniel Mensinger1-5/+5
2020-09-08typing: fix code reviewDaniel Mensinger1-5/+5
2020-09-08typing: fix envconfig typingDaniel Mensinger1-1/+1
2020-08-30Be stricter when detecting Windows/CygwinChristoph Reiter1-2/+2
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-01machine-files: deprecate the paths sectionDylan Baker1-40/+0
2020-06-29envconfig: Add [constants] section in machine filesXavier Claessens1-28/+1
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-19envconfig: Add support SuperH SH-4Dylan Baker1-2/+3
Fixes: #7358
2020-06-10Updated to resolve issue identifying SGI CPUs on IRIX systemsEric Dodd1-1/+5
2020-05-11Add AVR to cpu families. Closes #7085.Jussi Pakkanen1-0/+1
2020-05-07envconfig: Always honor PKG_CONFIG_PATHDylan Baker1-1/+1
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-04-21switch python2 %s for python3 .formatMichael1-5/+5
2020-04-10Recognize Hurd as platform/OSPino Toscano1-0/+6
2020-03-23Revert "Naturally use env vars a bit more to match Autoconf"Jussi Pakkanen1-2/+2
This reverts commit 097dfc085e6a1bb3c670880134a52dcfca504be7.
2020-03-23Naturally use env vars a bit more to match AutoconfJohn Ericson1-2/+2
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-23Fix legacy env var support with crossJohn Ericson1-49/+65
Fix #3969
2020-03-21-Add xc16 and c2000 C,Cpp toolchain supportalanNz1-0/+3
2020-03-17envconfig: Make compiler and linker environment variables matchDylan Baker1-7/+23
2020-01-23Add m68k to known cpus for Motorola 68000 series processorsDylan Baker1-0/+1
Fixes #6492
2020-01-22environment: Replace LD with <LANG>LDDylan Baker1-1/+9
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-22envconfig: add pkg_config_libdir propertyStéphane Cerveau1-0/+6
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-15envconfig: s390x is 64bitDylan Baker1-0/+1
s390 is the 31/32bit variant, s390x is the 64 bit.
2020-01-15Add s390 to list of known architecturesDylan Baker1-0/+1
Fixes #6411
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-32/+32