summaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
Commit message (Collapse)AuthorAgeFilesLines
...
* typing: more fixesDaniel Mensinger2020-09-081-11/+14
|
* environment: use ExternalProgram to find ninjaPaolo Bonzini2020-09-041-6/+10
| | | | | | | | | | | This allows the NINJA environment variable to support all the Windows special cases, especially allowing an absolute path without extension. Based on a patch by Yonggang Luo. Fixes: #7659 Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* environment: do not raise exception in detect_cuda_compilerMatt Madison2020-09-021-2/+0
| | | | | | | | | when the compiler is not a string. When the compiler is set in the build configuration (required, for example, in a cross-build setup), the compiler setting is already a list, which is the desired type. Signed-off-by: Matt Madison <matt@madison.systems>
* Be stricter when detecting Windows/CygwinChristoph Reiter2020-08-301-3/+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
* Merge pull request #7581 from peterh/aixJussi Pakkanen2020-08-251-4/+17
|\ | | | | Add AIX support
| * aix: allow both 32-bit and 64-bit objects in a static libraryPeter Harris2020-08-121-2/+2
| | | | | | | | | | | | Without the -Xany flag, the ar command will complain when an .o file is compiled for the non-default bit width. This change is necessary to allow 64-bit builds via a native (or cross) file.
| * aix: detect and support the AIX dynamic linkerPeter Harris2020-08-121-0/+9
| |
| * aix: fix cpu family detectionPeter Harris2020-08-121-2/+6
| | | | | | | | Like the BSDs, AIX does not return anything useful in platform.machine().
* | Merge pull request #7600 from alexrp/masterJussi Pakkanen2020-08-231-1/+2
|\ \ | | | | | | Add C2x option support.
| * | Update LLVM tool versions for LLVM/Clang 10.Alex RĂžnne Petersen2020-08-221-1/+2
| |/
* | Merge pull request #7609 from dcbaker/submit/2020-08/cmake-fix-apple-clangJussi Pakkanen2020-08-221-2/+7
|\ \ | | | | | | Fix mapping of apple compilers in cmake
| * | compilers: Add Apple subclasses for ObjC and ObjC++Dylan Baker2020-08-221-2/+7
| |/ | | | | | | | | These are needed because in some cases we need to be able to know if we're using vanilla clang or Apple's clang.
* | Merge pull request #7447 from scivision/nvcJussi Pakkanen2020-08-221-3/+24
|\ \ | |/ |/| Add support for NVidia HPC SDK compilers
| * add Nvidia HPC SDK compilersMichael Hirsch, Ph.D2020-07-131-3/+24
| |
* | Use uname -p to detect x86_64 on QNX.Elad Lahav2020-08-081-1/+1
| |
* | "Downgrade" warning when regenerating after version bumpZbigniew Jędrzejewski-Szmek2020-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | There is nothing to "warn" about, this is a completely routine occurence. OTOH, when something is corrupted, we should warn. Keep the red color and "WARNING:" prefix in that case. Example output: $ ninja -C build Regenerating configuration from scratch: Build directory has been generated with Meson version 0.55.999, which is incompatible with current version 0.56.0. The Meson build system Version: 0.56.0 ...
* | Capitalize some constants in coredataJohn Ericson2020-08-041-2/+2
| | | | | | | | | | I've been getting confused between them and similarly-named other things, so I figured it was high time to clean this up.
* | Make meson recognize the Qualcomm LLVM toolchainAntony Chan2020-08-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson calls `path/to/clang++ --version` to guess which build toolchain the user has picked to build the source code. For the Qualcomm LLVM toolchain, the output have an unusual output as shown below: ``` clang version 8.0.12 Snapdragon LLVM ARM Compiler 8.0.12 (based on llvm.org 7.0+) Target: arm-unknown-linux-gnueabi Thread model: posix Repository: (ssh://git-hexagon-aus.qualcomm.com:...) InstalledDir: /pkg/qct/software/llvm/release/arm/8.0.12/bin ``` Another unusual pattern is the output of `path/to/ld.qcld --version`: ``` ARM Linker from Snapdragon LLVM ARM Compiler Version 8.0.12 ARM Linker based on LLVM version: 8.0 ``` The Meson logic is modified accordingly so that Meson can correctly determine toolchain as "LLVM aarch64 cross-compiler on GNU/Linux64 OS". This is the expected output of `meson --native-file native_file.ini --cross-file cross_file.ini build/aarch64-debug/`: ``` ... C++ compiler for the host machine: ... (clang 8.0.12 "clang version 8.0.12") C++ linker for the host machine: ... ld.lld 8.0.12 ... ```
* | Put machine file and cmd line parsing in EnvironmentDylan Baker2020-08-011-8/+122
| | | | | | | | | | | | | | | | | | This creates a full set of option in environment that mirror those in coredata, this mirroring of the coredata structure is convenient because lookups int env (such as when initializing compilers) becomes a straight dict lookup, with no list iteration. It also means that all of the command line and machine files are read and stored in the correct order before they're ever accessed, simplifying the logic of using them.
* | machine-files: deprecate the paths sectionDylan Baker2020-08-011-19/+7
| |
* | Allow setting built-in options from cross/native filesDylan Baker2020-08-011-5/+23
| | | | | | | | | | | | | | | | | | | | This is like the project options, but for meson builtin options. The only real differences here have to do with the differences between meson builtin options and project options. Some meson options can be set on a per-machine basis (build.pkg_config_path vs pkg_config_path) others can be set on a per-subproject basis, but should inherit the parent setting.
* | Allow setting project options from cross or native filesDylan Baker2020-07-301-0/+19
| | | | | | | | | | | | This allows adding a `[project options]` section to a cross or native file that contains the options defined for a project in it's meson_option.txt file.
* | Support armel/armhf builds on native arm64 hosts.Mark Hindley2020-07-301-1/+2
| |
* | SolarisDynamicLinker: report ld's version instead of gcc'sAlan Coopersmith2020-07-071-1/+7
|/ | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* find_program: Do not use fallback when before parsing project()Xavier Claessens2020-07-041-0/+1
| | | | | Mesa is doing `project(... find_program() ...)` so environment.wrap_resolver is not defined yet.
* environment: Correctly detect arm64 as aarch64Marvin Scholz2020-07-021-0/+2
| | | | | | On some systems aarch64 is reported as arm64. Due to mesons mangling of everything that starts with arm, it would end up being detected as arm (which implies 32 bit) which is incorrect.
* envconfig: Add [constants] section in machine filesXavier Claessens2020-06-291-5/+3
| | | | | | | 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.
* coverage: llvm-cov supportCary Converse2020-06-171-1/+10
|
* environment: fallback regex for versions like 2020.01Michael Hirsch2020-06-151-2/+8
| | | | add four-digit version unit_test cases
* Updated to resolve issue identifying SGI CPUs on IRIX systemsEric Dodd2020-06-101-0/+3
|
* compilers: add fetching of define list for clangYevhenii Kolesnikov2020-05-221-1/+25
| | | | | | | | | | | | | | | Simmilar to gcc, the list of pre-processor defines can be fetched with `-dM -E` option. The way cpu_family is determined on linux relies on this list. Fixes incorrect value of cpu_family on linux, when crosscompiling: ``` CC="clang -m32" meson ./build ``` Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
* Fix outdated cross-compilation checksOle André Vadla RavnÄs2020-05-131-10/+10
|
* Improve Emscripten linker version detectionAndrei Alexeyev2020-05-101-6/+9
|
* switch python2 %s for python3 .formatMichael2020-04-211-4/+4
|
* Compiler options per langJohn Ericson2020-04-201-2/+2
| | | | | | | | | | | A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
* environment: "power machintosh" is ppcDylan Baker2020-03-291-4/+2
| | | | | | | | I've combined the two ppc checks into one, since they're not very complicated and added power machintosh, which is used by PPC macs running older versions of osx. Fixes: #6746
* Clarify a workaround for older versions of LLD for MinGW (#6836) [skip ci]Martin Storsjö2020-03-241-1/+3
| | | | | | | The previous diagnosis (that the wrapper that injects the -target option to clang caused the issues) doesn't seem right; the issue was that LLD's MinGW frontend (which is invoked when ld.lld is given a COFF argument to the -m option) didn't handle the --version argument before LLD 9.0.0.
* Fix legacy env var support with crossJohn Ericson2020-03-231-17/+18
| | | | Fix #3969
* -Add xc16 and c2000 C,Cpp toolchain supportalanNz2020-03-211-1/+35
|
* Fix bogus parameter passed to LLVMDynamicLinker (llvm-mingw regression)Andrei Alexeyev2020-03-191-1/+1
|
* Merge pull request #6356 from dcbaker/fix-d-compiler-abstractionsJussi Pakkanen2020-03-121-36/+54
|\ | | | | Fix d compiler abstractions
| * linkers: Allow optlink to be invoked indirectlyDylan Baker2020-03-091-1/+1
| |
| * Allow invoking the linker directly through dmdDylan Baker2020-03-091-11/+21
| | | | | | | | | | DMD is awful in a lot of ways. To change the linker you set an environment variable, which is pretty much impossible for us.
| * Allow invoking link.exe and lld-link.exe through ldc2Dylan Baker2020-03-091-24/+32
| | | | | | | | Like it wants
* | Improve regular expression for MSVC compiler target arch detectionLuca Bacci2020-03-101-1/+1
| | | | | | | | | | | | | | Did not work for some MSVC output language combinations. Now should work for every locale / output language. Fixes issue #6757
* | Merge pull request #6688 from dcbaker/emcc-linker-bugsJussi Pakkanen2020-03-081-1/+11
|\ \ | |/ |/| Emcc linker bugs and improvments
| * compilers/linkers: Add a representation for wasm-ldDylan Baker2020-02-271-1/+11
| | | | | | | | | | | | | | Emscripten does have a stand alone linker, wasm-ld. This patch adds the linker, adds detection for the linker, and removes the IsLinkerMixin for emscripten. This is a little more correct, and makes the code a lot cleaner and more robust.
* | environment: Strip 'el' from the end of mips architecturesDylan Baker2020-02-291-0/+6
| | | | | | | | | | | | | | | | Mips architectures may have `el` on the end, to differentiate the little endian from the big endian variants. We don't encode endianness in the cpu names, so ensure we've stripped that. Fixes #6655
* | environment: Fix construction of CudaLinkerJan Alexander Steffens (heftig)2020-02-281-1/+1
|/ | | | | | | | | | | | | | | | | | | The 0.53.2 test suite has a new failure: Traceback (most recent call last): File "run_project_tests.py", line 1024, in <module> detect_system_compiler() File "run_project_tests.py", line 964, in detect_system_compiler comp = env.compiler_from_language(lang, MachineChoice.HOST) File "/build/meson/src/meson-0.53.2/mesonbuild/environment.py", line 1565, in compiler_from_language comp = self.detect_cuda_compiler(for_machine) File "/build/meson/src/meson-0.53.2/mesonbuild/environment.py", line 1131, in detect_cuda_compiler linker = CudaLinker(compiler, for_machine, 'nvlink', CudaCompiler.LINKER_PREFIX, [], version=CudaLinker.parse_version()) File "/build/meson/src/meson-0.53.2/mesonbuild/linkers.py", line 963, in __init__ super().__init__('nvlink', *args, **kwargs) TypeError: __init__() takes 6 positional arguments but 7 positional arguments (and 1 keyword-only argument) were given Fixes: c708c52ca225 ("linkers: Update the linker names to be more consistent")
* Merge pull request #6637 from ↔Jussi Pakkanen2020-02-231-2/+2
|\ | | | | | | | | mesonbuild/nirbheek/implement-symbolextractor-windows Implement symbolextractor on windows + some cleanups/fixes