aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-06environment: copy self.cmd_line_options to not modify original optionsXavier Claessens1-1/+1
That dict gets modified when adding default_options, but mesonmain will need to keep the original values.
2018-06-06Convert args.projectoptions into a dictXavier Claessens1-1/+1
This simplifies a lot of code, and centralize "key=value" parsing in a single place. Unknown command line options becomes an hard error instead of merely printing warning message. It has been warning it would become an hard error for a while now. This has exceptions though, any unknown option starting with "<lang>_" or "b_" are ignored because they depend on which languages gets added and which compiler gets selected. Also any option for unknown subproject are ignored because they depend on which subproject actually gets built. Also write more command line parsing tests. "19 bad command line options" is removed because bad cmd line option became hard error and it's covered with new tests in "30 command line".
2018-06-06Remove had_argument_for() it is not used anymoreXavier Claessens1-14/+1
This also means we don't need to keep original command line arguments anymore.
2018-06-06Move to coredata some methods handling optionsXavier Claessens1-9/+0
Those methods only use coredata object, so better just move them as a coredata method.
2018-06-06Move get_args_from_envvars() from environment to compilersXavier Claessens1-53/+0
2018-06-06environment.py: Properly check platform on MSVC 2008Chun-wei Fan1-3/+11
The 'Platform' envvar may not be set on Visual Studio 2008, at least when using the SDK 7.0 compilers, so check the 'BUILD_PLAT' envvar so that we do not mis-detect x64 build environments as x86.
2018-06-05Automatically add cross-mingw root and sysroot bindir to WINEPATHNirbheek Chauhan1-0/+6
This ensures that all the system DLLs required by executables such as libstdc++-6.dll can be found out of the box and tests can run
2018-06-04Update environment.pyNiklas Claesson1-1/+1
Fix typo in environment.py
2018-06-03Error out when someone tries to use msys/python to run MesonNirbheek Chauhan1-0/+5
This mistake seems to be a very common hiccup for people trying to use Meson with MSYS2 on Windows from git or with pip. msys/python uses POSIX paths with '/' as the root instead of a drive like `C:/`, and also does not identify the platform as Windows. This means that configure checks will be wrong, and many build tools will be unable to parse the paths that are returned by functions in Python such as shutil.which. Closes https://github.com/mesonbuild/meson/issues/3653
2018-06-01Set the meson command to use when we know what it isNirbheek Chauhan1-3/+3
Instead of using fragile guessing to figure out how to invoke meson, set the value when meson is run. Also rework how we pass of meson_script_launcher to regenchecker.py -- it wasn't even being used With this change, we only need to guess the meson path when running the tests, and in that case: 1. If MESON_EXE is set in the env, we know how to run meson for project tests. 2. MESON_EXE is not set, which means we run the configure in-process for project tests and need to guess what meson to run, so either - meson.py is found next to run_tests.py, or - meson, meson.py, or meson.exe is in PATH Otherwise, you can invoke meson in the following ways: 1. meson is installed, and mesonbuild is available in PYTHONPATH: - meson, meson.py, meson.exe from PATH - python3 -m mesonbuild.mesonmain - python3 /path/to/meson.py - meson is a shell wrapper to meson.real 2. meson is not installed, and is run from git: - Absolute path to meson.py - Relative path to meson.py - Symlink to meson.py All these are tested in test_meson_commands.py, except meson.exe since that involves building the meson msi and installing it.
2018-05-24depfixer: We no longer run this as a scriptNirbheek Chauhan1-4/+0
2018-05-21Write coredata transactionally. Closes #3511.Jussi Pakkanen1-3/+1
2018-04-27Passing --default-library=both should override project valueXavier Claessens1-1/+1
Looks like this has always been broken, had_argument_for() was checking if we have --default_library instead of --default-library.
2018-04-16Merged Arm CC support.Jussi Pakkanen1-0/+7
2018-04-15Merge pull request #3115 from makise-homura/e2k-lcc-supportJussi Pakkanen1-6/+44
Support lcc compiler for e2k (Elbrus) architecture
2018-04-12Make more precise CPU detection for Elbrus platformmakise-homura1-0/+3
2018-04-02Fix detection to work with newer Java compilers.Jussi Pakkanen1-1/+1
2018-03-28Added version detection for lcc compilermakise-homura1-2/+13
2018-03-27Updates to CPP support and update review changesSomasekhar Penugonda1-8/+7
2018-03-19Added Elbrus lcc compilers support as inheritance from gcc onesmakise-homura1-3/+27
2018-03-14- Updating cpp_std options similar to other compiler classesBedarkar, Malhar1-5/+4
- Updating environment.py for selecting '--vsn' option for armcc only. - Updating build type arguments from GitHub pull request - 3157 Change-Id: Id3151e7715ec1016afdbd65391bb0d414ec7de13
2018-03-13Merge pull request #3145 from thejk/gcovrJussi Pakkanen1-4/+17
Support gcovr >= 3.1 and add gcovr html report as fallback
2018-03-13fixup! Fix coverage-xml and coverage-text targets for gcovr >= 3.1Joel Klinghed1-1/+2
Fix fail cases of detect_gcovr
2018-03-12fixup! Fix coverage-xml and coverage-text targets for gcovr >= 3.1Joel Klinghed1-2/+2
Rename gcovr_3_1 to gcovr_new_rootdir
2018-03-05First cut of ARMCC support for MESON.Bedarkar, Malhar1-2/+11
Change-Id: I15d8258e84d392baaccb8f670e33eefcfe8cd49a
2018-03-01Harmonize data pickling.Hemmo Nieminen1-5/+3
Try to be more consistent on using save() and load() methods to pickle data.
2018-03-01Remove some unused variables.Hemmo Nieminen1-1/+0
2018-02-27Fix coverage-xml and coverage-text targets for gcovr >= 3.1Joel Klinghed1-4/+16
In gcovr 3.1 the -r/--rootdir argument changed meaning causing reports generated with gcovr 3.1 to not find the source files and look for *.gcda in the whole source tree rather than the build dir. So, detect gcovr version and if 3.1 give build_root to -r instead of source_root.
2018-02-25Add support for Visual Studio csc c# compilerThibault Saunier1-11/+24
2018-02-21Fixed syntax issues (for 'in' operator)makise-homura1-3/+3
2018-02-21Support lcc compiler for e2k (Elbrus) architecturemakise-homura1-3/+3
2018-02-15Fix exception in 'test cases/failing/55 wrong shared crate type' when rustc ↵Jon Turney1-2/+3
is missing Fix exception handling of missing rustc, by making it look like the other compiler detectors Traceback (most recent call last): File "/wip/meson/mesonbuild/environment.py", line 699, in detect_rust_compiler p, out = Popen_safe(compiler + ['--version'])[0:2] [...] FileNotFoundError: [Errno 2] No such file or directory: 'rustc': 'rustc' During handling of the above exception, another exception occurred: [...] File "/wip/meson/mesonbuild/environment.py", line 701, in detect_rust_compiler popen_exceptions[compiler] = e TypeError: unhashable type: 'list'
2018-02-04Merge pull request #2938 from acfoltzer/rust-cross-mergeJussi Pakkanen1-10/+19
Add cross-compilation support for `rustc`
2018-01-29Add cross-compilation support for `rustc`Adam C. Foltzer1-10/+19
This patch is largely modeled on the relatively-straightforward code for Fortran cross-compilation, so there might be some intricacies missing.
2018-01-30Use os.path: basename() and dirname() instead of split()Aleksey Filippov1-1/+1
According to Python documentation[1] dirname and basename are defined as follows: os.path.dirname() = os.path.split()[0] os.path.basename() = os.path.split()[1] For the purpose of better readability split() is replaced by appropriate function if only one part of returned tuple is used. [1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-19Correct spelling mistakes.Edward Betts1-1/+1
2018-01-07d: Detect recent DMD compilersMatthias Klumpp1-1/+1
They now are published by the D Language Foundation, and not Digital Mars. Therefore, their signature has changed slightly. (We can not check for 'DMD', because that string appears in every compiler version output to denote the frontend version used by the compiler).
2017-12-30compilers: Fix error when objc/objc++ compilers are not foundNirbheek Chauhan1-0/+2
Earlier it would exit with a traceback: UnboundLocalError: local variable 'out' referenced before assignment
2017-12-16Fix flake8 issues.Christoph Behle1-9/+9
2017-12-16More version information for Fortran.Christoph Behle1-0/+1
2017-12-16More version information for DChristoph Behle1-3/+4
2017-12-16More version information for C#Christoph Behle1-1/+2
2017-12-16More version information for compilers.Christoph Behle1-3/+4
See issue #2762 Adds full_version to class Compiler. If set full_version will be printed additionally. Added support for CCompiler and CPPCompiler Added support for gcc/g++, clang/clang++, icc.
2017-11-26spelling: targetingJosh Soref1-1/+1
2017-11-21Review fixes.Jussi Pakkanen1-1/+1
2017-11-20Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen1-8/+4
2017-11-11compilers: Improve manual library searchingNirbheek Chauhan1-42/+2
We can now specify the library type we want to search for, and whether we want to prefer static libraries over shared ones or the other way around. This functionality is not exposed to build files yet.
2017-11-06Dump coredata earlier.Elliott Sales de Andrade1-2/+1
Unfortunately, `time.time` and file timestamps are not guaranteed to be in sync and due to various kernel caches may be different enough to cause rebuilds to fail [1]. This was masked by older ninja versions that could not read sub-second timestamps. [1] https://travis-ci.org/mesonbuild/meson/jobs/296797872
2017-10-21dependencies: Add function to strip system -L pathsDylan Baker1-0/+18
PkgConfig automatically removes -L paths from libdirs if the -L points to a system path. It knows what these paths are by taking this as a configure option at build time, which the distro maintainers set appropriately and everything works. This allows one to have two versions of a package installed, a system and non system, and then override PKG_CONFIG_PATH to use the non system version, and everything just works. For non-pkgconfig dependencies (such as LLVM) meson needs to strip these themselves to avoid breaking the above use case.
2017-09-18Revert "Revert "Merge pull request #1931 from centricular/use-patched-ninja""Nirbheek Chauhan1-1/+4
This reverts commit 5eb64a6f3e47b570f544524ef48dc6ef0e4dce59. Let's try again, with a fixed Ninja by QuLogic.