summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/detect.py
Commit message (Collapse)AuthorAgeFilesLines
* During reconfigure, show that no compiler was found, if compiler fails ↵Volker Weißmann2023-05-131-4/+8
| | | | sanity check.
* Initial support for Metrowerks AssemblerNomura2023-05-061-1/+11
|
* Initial support for Metrowerks C/C++ compilerNomura2023-04-241-3/+38
|
* rust: Use the corresponding rustc version when clippy-driver is chosen as ↵Sebastian Dröge2023-04-141-1/+12
| | | | | | | | Rust compiler By default clippy-driver will report its own version, which is not very useful to check the toolchain version. Instead make sure to extract the actual toolchain version here.
* fix various spelling issuesJosh Soref2023-04-111-4/+4
| | | | Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* detect.py: Be more precise about detecting xtensa gcc toolchainsKhem Raj2023-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | clang --version can yield a string like below when its installed into such a directory clang version 14.0.0 (https://github.com/llvm/llvm-project 3f43d803382d57e3fc010ca19833077d1023e9c9) Target: aarch64-yoe-linux Thread model: posix InstalledDir: /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-text-editor/42.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux as you can see InstallDir has 'xt-' subtring and this trips the check to guess gcc if 'Free Software Foundation' in out or 'xt-' in out: Therefore, check if compiler output starts with xt- then assume it to be gcc Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nasm: Detect and use MSVC linker if presentL. E. Segovia2023-02-201-0/+3
| | | | Fixes #11082
* emscripten: remove no longer relevant commentKleis Auke Wolthuizen2022-12-271-2/+1
| | | | | This was fixed in Emscripten 1.39.16, see: https://github.com/emscripten-core/emscripten/commit/d4fabf3da40e7f556700b16950739d5960a91559
* Compilers: Keep ccache and exelist separatedXavier Claessens2022-10-251-27/+25
| | | | | Only combine them in the Compiler base class, this will make easier to run compiler without ccache.
* basic support for oneapi compilersRobert Cohn2022-10-241-3/+35
|
* Add MASM compilerXavier Claessens2022-10-241-0/+42
| | | | ml and armasm are Microsoft's Macro Assembler, part of MSVC.
* nasm: Harcode default path on WindowsXavier Claessens2022-10-241-0/+4
| | | | | NASM's installer does not add itself into PATH, even when installed by choco.
* Add yasm as fallback for nasm languageXavier Claessens2022-10-241-2/+6
|
* Add NASM compilerXavier Claessens2022-10-241-0/+31
|
* pylint: enable use-maxsplit-argDylan Baker2022-09-191-2/+2
| | | | | This finds a bunch of places where we can do more efficient string splitting.
* fix odd mypy issue in unreachable codeEli Schwartz2022-09-191-0/+1
| | | | | | This used to be fine, until imports were removed from this file. Now a function annotated as T.NoReturn doesn't actually tell mypy that it cannot return, though, so we manually do it.
* simplify type annotationEli Schwartz2022-09-191-1/+1
|
* compilers: avoid importing compilers upfront for detectEli Schwartz2022-09-191-114/+2
| | | | | | | | | | | | We no longer need these upfront at all, since we now import the ones we need for the language we are detecting, at the time of actual detection. This avoids importing 28 files, consisting of just under 9,000 lines of code, at interpreter startup. Now, it is only imported depending on which languages are invoked by add_languages, which may not even be anything. And even if we do end up importing a fair chunk of it for C/C++ projects, spreading the import cost around the interpreter runtime helps responsiveness.
* compilers: perform targeted imports for detectEli Schwartz2022-09-191-86/+103
| | | | | | | | Only import the ones we need for the language we are detecting, once we actually detect that language. This will allow finally dropping the main imports of these files in a followup commit.
* compilers: use more direct checks for what kind of compiler we haveEli Schwartz2022-09-191-7/+7
| | | | | | | | Instead of comparing against specific compiler classes, check the logical compiler id or language etc. In a couple cases, we seem to be missing a couple things by being a bit too strict about the exact class type.
* compilers/detect: rename potentially conflicting nameEli Schwartz2022-09-191-12/+12
| | | | Preparation for future commit.
* compilers: use consistent function signature for objcEli Schwartz2022-09-191-7/+7
| | | | | e.g. for detect_c_or_cpp we just take the language itself as an argument.
* compilers: remove dead codeEli Schwartz2022-09-191-1/+1
| | | | | It doesn't matter whether the language is c or cpp, xc16 only has a C compiler so that's what this has to be.
* compilers: single-source compiler class as cls, consistentlyEli Schwartz2022-09-191-18/+26
| | | | It's the style for most, but not all, of this file.
* linkers: Add a representation for the Apple AR LinkerDylan Baker2022-07-251-1/+2
| | | | | | | | Which is old and annoying and doesn't expose global symbols by default, so we need a work around. see: https://github.com/mesonbuild/meson/pull/10587 see: https://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html
* ar linker: detect the "osx ld" case (where generating thin archives won't ↵Justin Blanchard2022-07-211-3/+3
| | | | work) based on host OS, not build OS.
* compilers: add logging to obscure compiler defines scraperEli Schwartz2022-07-211-2/+8
| | | | | | | | | | | | | | | | | | | If this command fails, for example when CXX is something not generic enough to be a valid universal compiler command (clang -std=c++11 perhaps), we end up with two problems: - it's impossible to figure out what Meson ran to get that error - the error report isn't clear on what is stdout and what is stderr, or even that that is what the message is about. ``` meson.build:1:0: ERROR: Unable to get clang pre-processor defines: error: invalid argument '-std=c++11' not allowed with 'C' ``` What's C doing there and why is Meson talking about it? Answer: that's compiler stdout. Say so.
* compilers: include compiler detection output in the debug logsEli Schwartz2022-07-211-0/+5
| | | | | | We do something similar when running get_compiler() method checks from the DSL. This ensures that if errors happen, the log file we tell people to check actually works.
* compilers: better reporting of command failuresEli Schwartz2022-07-211-25/+26
| | | | Use join_args to ensure that commands are rendered correctly.
* Detect Cython and Vala compilers on the build machine alwaysTristan Partin2022-07-061-4/+3
| | | | | | Transpilers need to run on the build machine in order to generate their output, which can then be taken by a cross-compiler to create the final output.
* ACfL version detection with regexStepan Nassyr2022-06-101-28/+6
|
* Allow for 3-component ACfL versionsStepan Nassyr2022-06-101-8/+26
|
* move various imports into TYPE_CHECKING blocks for neatnessEli Schwartz2022-05-231-8/+10
|
* linkers: Add support for mold linkerFini Jastrow2022-04-301-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | [why] Support for the relatively new mold linker is missing. If someone wants to use mold as linker `LDFLAGS="-B/path/to/mold"` has to be added instead of the usual `CC_LD=mold meson ...` or `CXX_LD=mold meson ...`. [how] Allow `mold' as linker for clang and newer GCC versions (that versions that have support). The error message can be a bit off, because it is generic for all GNU like compilers, but I guess that is ok. (i.e. 'mold' is not listed as possible linker, even if it would be possible for the given compiler.) [note] GCC Version 12.0.1 is not sufficient to say `mold` is supported. The expected release with support will be 12.1.0. On the other hand people that use the un-released 12.0.1 will probably have built it from trunk. Allowing 12.0.1 is helping bleeding edge developers to use mold in Meson already now. Fixes: #9072 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
* Debian renamed cython to cython3, support bothXavier Claessens2022-03-241-1/+1
|
* compilers: fix mypy warning in Rust detectionDylan Baker2022-03-221-0/+1
|
* remove unused type ignore that mypy 0.940 no longer needsEli Schwartz2022-03-121-1/+1
| | | | And now that it doesn't need it, it errors out when you use it.
* flake8: fix various whitespace errors with badly aligned codeEli Schwartz2022-02-161-2/+1
|
* flake8: remove some redundant separatorsEli Schwartz2022-02-161-1/+1
|
* flake8: fix typoed whitespace surrounding tokensEli Schwartz2022-02-161-1/+1
|
* Genericise TI compiler and add MSP430 supportWilliam Toohey2022-02-021-16/+32
|
* mark regex string as raw string to fix invalid escapesEli Schwartz2022-01-271-2/+2
|
* flake8: fix indentation styleEli Schwartz2022-01-271-23/+23
|
* armltdclang: add support for ARM Ltd.'s `armclang` toolchainBen Boeckel2022-01-031-0/+28
| | | | | | | | | | This is another toolchain also called `armclang`, but it is not a cross compiler like Keil's `armclang`. It is essentially the same as `clang` based on its interface and CMake's support of the toolchain. Use an `armltd` prefix for the compiler ID. Fixes: #7255
* Add 64-bit paths to check for unsupported Watcom cl.exe clones.William D. Jones2021-10-311-1/+4
|
* fix various flake8 whitespace errorsEli Schwartz2021-10-271-1/+1
|
* Add sccache support.Jussi Pakkanen2021-10-251-2/+7
|
* Fix compiler detection for cl/clang-clJesse Natalie2021-10-061-1/+1
| | | | If the compiler specified is a path to a compiler, the current detection is broken. It needs to use just the compiler name instead.
* fix extra whitespaceEli Schwartz2021-10-041-3/+0
| | | | discovered via flake8 --select E303
* Fix mypy errorsmakise-homura2021-09-291-5/+8
|