Commit Graph

88 Commits

Author SHA1 Message Date
Petr Machacek eb74bb8dbf Added support for Texas Instruments C6000 compiler. 2024-03-12 20:38:30 +02:00
Erik Bråthen Solem 0e1cba6d8b envconfig: read CYTHON from the environment and use it if set
Add support for specifying Cython compiler using the CYTHON environment
variable. If not set, proceed with the names hard coded for Cython.
2024-01-01 01:50:37 -05:00
Dylan Baker e991c4d454 Use SPDX-License-Identifier consistently
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.

This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.

SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
2023-12-13 15:19:21 -05:00
Xavier Claessens bf9314e00d pkgconfig: Allow setting both pkgconfig and pkg-config
This was previously allowed for different usage. Keep allowing it, but
with non fatal deprecation notice, and ignore the value from legacy
pkgconfig.
2023-10-19 15:20:22 -04:00
Kunwu.Chan c0da998afa
CPU family support 'sw_64' and remove the compile warning (#12273)
add sw_64 to the list of known cpus
2023-09-22 08:33:19 -07:00
Xavier Claessens 6a56f6d98f pkgconfig: Deprecate "pkgconfig" in favor of "pkg-config" in [binaries] 2023-09-18 13:51:27 -04:00
Eli Schwartz 90ce084144
treewide: automatic rewriting of all comment-style type annotations
Performed using https://github.com/ilevkivskyi/com2ann

This has no actual effect on the codebase as type checkers (still)
support both and negligible effect on runtime performance since
__future__ annotations ameliorates that. Technically, the bytecode would
be bigger for non function-local annotations, of which we have many
either way.

So if it doesn't really matter, why do a large-scale refactor? Simple:
because people keep wanting to, but it's getting nickle-and-dimed. If
we're going to do this we might as well do it consistently in one shot,
using tooling that guarantees repeatability and correctness.

Repeat with:

```
com2ann mesonbuild/
```
2023-08-11 13:41:03 -04:00
Eli Schwartz a01418db0a
remove useless type annotations
These annotations all had a default initializer of the correct type, or
a parent class annotation.
2023-08-11 13:37:17 -04:00
Jussi Pakkanen a4fb8dcc41
Merge pull request #11902 from dcbaker/submit/rust-module-enhancements
Rust module enhancements for mesa
2023-06-27 23:57:13 +03:00
Aditya Kamath 8946bc05f7
Archive shared library in AIX (#11850)
* Archive shared library in AIX

This code change to ensure we archive shared libraries in AIX.

The things we do are:
Archive shared library
Install archived shared library
Build all must build the archived shared library
blibpath must have the archived shared library dependency.

* Archive shared library in AIX.

Made changes as per the review comments given in the first
PR request.

They are:-
Use self.environment.machines[t.for_machine].is_aix()
Remove trial spaces
Use of val instead of internal
Changed comments wherever requested

* Space after octothorpe

* Fixed failed test case causing build break during install section

* Moved AIX specific code to AIXDynamicLinker from backend

* Fix indentation, trailing spaces, add type annotations and Linux/macOS build break

* Remove some more trailing space issues

* Fixed the wrong return type in linkers
2023-06-27 22:02:32 +03:00
Dylan Baker c5b16ab8b9 modules/rust: Add a machine file property for extra clang args with bindgen
It's currently impossible to inject extra clang arguments when using
bindgen, which is problematic when cross compiling since you may need
critical arguments like `--target=...`. Because such arguments must be
passed after the `--` it's impossible to inject them currently without
going to something like a wrapper script.

Fixes: #11805
2023-06-27 11:53:18 -07:00
Jussi Pakkanen b0d2a92584 Add kernel and subsystem properties to machine objects. 2023-06-19 18:03:57 +03:00
Josh Soref cf9fd56bc9 fix various spelling issues
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
Eli Schwartz 680b5ff819
treewide: add future annotations import 2023-02-01 17:01:30 -05:00
Xavier Claessens 01ee141339 Add NASM compiler 2022-10-24 11:06:57 +02:00
Eli Schwartz 388cb0f805 env2mfile: reuse logical lists of interesting facts from meson itself
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-09-01 01:05:48 +03:00
Samay Sharma 2c1ac8ac1d Add LLVM_CONFIG support 2022-08-30 15:06:51 -04:00
Daniel Mensinger 7c320e60f1 cmake: Change assertion into a more useful error (fixes #9925) 2022-08-04 15:23:36 -04:00
Artturin 8a8ab9a8e0 envconfig: add more binutils variables
follow standard variables and allow distributions to remove some entries from their cross-files

ex:
f23acdd24b/common/build-style/meson.sh (L50-L54)

variables chosen from the variables nixos sets
ea0f14a502/pkgs/build-support/bintools-wrapper/setup-hook.sh (L58)

sorted alphabetically
2022-07-31 18:57:53 -04:00
Dylan Baker 9ee0de427c envconfig: use $PKG_CONFIG for pkg-config find_program as well as pkgconfig
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-22 15:15:29 +02:00
Eli Schwartz a009eacc65
treewide: string-quote the first argument to T.cast
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-03-07 19:01:04 -05:00
William Toohey b4d9b2551c Genericise TI compiler and add MSP430 support 2022-02-02 16:45:05 +02:00
Eli Schwartz 4b351aef26
first pass at migrating to dataclasses
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.
2022-01-10 18:36:57 -05:00
Rafael Silva 26f188fb36 add ft32 cpu family 2021-12-17 17:47:21 +02:00
Dylan Baker ba85c71750 modules/gnome: use envconfig for VAPIGEN
we have a mechanism for doing "this could be an environment variable"
let's use that.
2021-11-01 12:24:25 -07:00
Jussi Pakkanen 4840c86ec9 Add sccache support. 2021-10-25 19:59:49 -04:00
Daniel Mensinger 66b32a4591 holders: Introduce HoldableObject 2021-06-18 23:48:33 +02:00
Randy Yates d7cb58e57d add cpu family csky 2021-05-18 23:17:12 +03:00
Tristan Partin 4c13aa30a1 dependency: Add JDK system dependency
The JDK system dependency is important for detecting JDK include paths
that may be useful when developing a JNI interface.
2021-04-12 10:43:11 -07:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Xiaotian Wu 233afde4cc add loongarch support 2021-02-06 15:16:04 +00:00
Antonin Décimo 39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
Dylan Baker 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
Dylan Baker 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
Dylan Baker 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
Dylan Baker 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
Jussi Pakkanen d27bad7d6d
Merge pull request #8011 from dcbaker/submit/post-python36-cleanups
Python 3.6 cleanups
2020-11-22 04:28:19 +02:00
Dylan Baker 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
Dylan Baker 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
Daniel Mensinger 7e58f33376
cmake: Add cross compilation support 2020-10-13 17:04:19 +02:00
Dylan Baker 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
Xavier Claessens 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
Daniel Mensinger 4253bf6281
typing: Fix code review 2020-09-08 20:15:59 +02:00
Daniel Mensinger e681235e5f
typing: fix code review 2020-09-08 20:15:58 +02:00
Daniel Mensinger ca1878ffb5
typing: fix envconfig typing 2020-09-08 20:15:57 +02:00
Christoph Reiter 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
Dylan Baker 601789cc7c machine-files: deprecate the paths section 2020-08-01 22:00:06 -07:00
Xavier Claessens 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
Dylan Baker b384f82b9a envconfig: Add support SuperH SH-4
Fixes: #7358
2020-06-19 10:56:09 -07:00
Eric Dodd 71d68a940b Updated to resolve issue identifying SGI CPUs on IRIX systems 2020-06-10 22:16:14 +03:00