aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2020-01-25Fix required dependency() not failing when wrap-mode=nofallbackXavier Claessens1-1/+5
When a dependency is required, not found on the system, and its fallback is disabled with --wrap-mode=nofallback, meson should abort instead of returning not-found.
2020-01-25mconf: Recommend using --reconfigure when setting unknown optionsXavier Claessens1-0/+2
Fixes: #6477
2020-01-25wrap: Fix git clone with commit id in revisionXavier Claessens1-1/+1
Fixes: #6505.
2020-01-24compilers: Derive CompilerArgs from collections instead of typingNirbheek Chauhan1-1/+1
Deriving from typing.MutableSequence does not give us a usable sequence type on Python 3.5.2.
2020-01-24typing: Fix compatibility with Python 3.5.2Nirbheek Chauhan2-5/+5
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes https://github.com/mesonbuild/meson/issues/6427
2020-01-23cmake: Always Add C, CXX if no language is specified (fixes #6441)Daniel Mensinger3-30/+28
2020-01-23Set source and build dir envvars when running dist.Jussi Pakkanen1-4/+6
2020-01-23environment: Fix initialization of compilers that don't use aDylan Baker1-0/+5
_guess_linker method Fixes #6448
2020-01-22Move git helper out into mesonlib for reuseNirbheek Chauhan3-22/+18
Reuse the git helper for `meson wrap` and `meson subprojects` so we don't need to maintain the same git-colors-on-windows workarounds in multiple places.
2020-01-22msubprojects: Rename 'git' to 'git_output'Nirbheek Chauhan1-10/+10
No functional changes. Split out from the next commit for ease of reading.
2020-01-22wrap: Re-set the console mode after calling gitNirbheek Chauhan1-0/+6
`git submodule update --recursive` calls git clone recursively, and on Windows it will undo the console mode we set in mlog and cause ANSI colors to stop working. We could set it again only when we call that, but we will definitely miss other instances where this could happen in the future and regress.
2020-01-22wrap: Redirect stdin to DEVNULL when calling gitNirbheek Chauhan1-1/+4
Without this git messes up the console and ANSI colors stop working on Windows inside cmd.exe. This broke in https://github.com/mesonbuild/meson/pull/6139. Also add the same to all git calls. Missed this when I opened https://github.com/mesonbuild/meson/pull/6255
2020-01-22wrap: Always use a wrapper for running gitNirbheek Chauhan1-32/+28
We need this for the next commit.
2020-01-22wrap: Look for git only once at startupNirbheek Chauhan1-22/+20
No need to repeatedly call `shutil.which`.
2020-01-22wrap: Use uppercase for global constantsNirbheek Chauhan1-12/+12
This makes things much clearer and follows PEP8.
2020-01-23Add m68k to known cpus for Motorola 68000 series processorsDylan Baker1-0/+1
Fixes #6492
2020-01-22tests: Add a test case for finding ldDylan Baker1-3/+3
2020-01-22environment: Replace LD with <LANG>LDDylan Baker2-27/+49
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 Cerveau2-0/+12
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-22vs: Write checksums in PE binaries (DLLs and EXEs)Nirbheek Chauhan2-0/+7
This is needed for detecting data corruption, and its absence (or an incorrect value) is also used as a hint by anti-viruses that the binary may be malware. Flag is only supported by MSVC `link.exe`, not `lld-link.exe` https://docs.microsoft.com/en-us/cpp/build/reference/release-set-the-checksum
2020-01-22linkers: Accept both str and List[str] for _apply_prefixNirbheek Chauhan1-6/+10
Simplifies some usage.
2020-01-22linkers: Clarify a comment about rspfilesNirbheek Chauhan1-1/+2
2020-01-21Merge pull request #6481 from jon-turney/osx-qt-dep-crashDylan Baker1-1/+2
Fix dependency('qt') crash with old Qt on OSX
2020-01-18Fix typo in error messageXavier Claessens1-1/+1
2020-01-17wrap: Fix support of file:// URLsXavier Claessens1-3/+1
Fixes: #6445
2020-01-17Fix dependency('qt') crash with old Qt on OSXJon Turney1-1/+2
Don't fail with 'KeyError: QMAKE_XSPEC' if `qmake -query` doesn't report QMAKE_XSPEC. (Seen with 4.8.7)
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-15find_program: Always use USERPROFILE instead of HOMENirbheek Chauhan1-1/+4
On MSYS2 and MSYS, Python reads HOME instead of USERPROFILE, which gets the path wrong. Serves me right for not writing a test!!
2020-01-14dependency: add cursesMichael Hirsch, Ph.D2-1/+26
fixes #6096. Didn't use CMake because Curses is a real corner-case for CMake that would require Curses-specific enhancements to Meson's CMake interface.
2020-01-14find_program: Ignore programs in the WindowsApps directoryNirbheek Chauhan1-2/+18
The latest Windows 10 release in May 2019 added zero-sized files that act as stubs which when launched from cmd.exe spawn the Windows Store to install those apps. This also includes python.exe and python3.exe: https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/ Unfortunately, `import('python').find_installation('python3')` will then think that python3.exe is available on Windows. Or, worse, if the user has a fresh installation of Windows 10 and then installs the Python 3 using the official installer (not the Windows Store app), we will *still* pickup this stub because it will be first in `PATH`. Always remove the WindowsApps directory from `PATH` while searching. First reported at https://gitlab.freedesktop.org/gstreamer/cerbero/issues/223
2020-01-09pkgconfig module: add FeatureNew for requires: dependency('foo')Eli Schwartz1-2/+5
Introduced in https://github.com/mesonbuild/meson/pull/3131
2020-01-09dependencies: Add ability to set arbitrary variables onDylan Baker4-10/+36
declare_dependencies This allows dependencies declared in subprojects to set variables, and for those variables to be accessed via the get_variable method, just like those from pkg-config and cmake. This makes it easier to use projects from subprojects in a polymorphic manner, lowering the distinction between a subproject and an external dependency every further.
2020-01-08bugfix: hdf5 depenedency: make sure variable is always definedMichael Hirsch, Ph.D1-1/+1
2020-01-08types: Fix/ignore flake8 B014/F811Daniel Mensinger2-13/+13
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger52-922/+909
2020-01-07Bump version number for new development.Jussi Pakkanen1-1/+1
2020-01-07Prepare new release.0.53.0Jussi Pakkanen1-1/+1
2020-01-07environment: Fix detection of icc on macOSDylan Baker1-6/+3
Which wouldn't call the function to detect c_args and friends.
2020-01-06Updated linker MR (#6407)Jussi Pakkanen2-11/+20
* environment: Fix passing always args to a number of less common linkers These are mostly (oops xilink) proprietary linkers I can't use for various reasons. Fixes: #6332 * Add intelfix from scivision. * Ifort fix from scivision. * PGI fix from scivision. * Cuda fix from scivision. * Fix linker passing for armclang.
2019-12-31Make D template work even if dub is not available.Jussi Pakkanen1-7/+9
2019-12-29cmake: Use trace for missing link flags (fixes #6386)Daniel Mensinger2-3/+74
This is neccessary for static libraries, since the CMake file API does not add link flags here.
2019-12-28bugfix: netcdf pkgconfig stop if foundMichael Hirsch, Ph.D1-0/+2
2019-12-24bugfix: check len before indexMichael Hirsch, Ph.D1-2/+2
2019-12-22cmake: Fix obeject librariesDaniel Mensinger1-8/+56
This fixes an issue with generated sources and object libraries, as well as an issue on windows with the `link` linker and the vs backend. The last issue is resolved by building the source files multiple times to avoid extracting object files in meson.
2019-12-21Merge pull request #6355 from scivision/depmethodJussi Pakkanen5-163/+203
dependencies: refactor {coarray,mpi,hdf5,netcdf} to use dependency(.., methods: ...)
2019-12-19summary: Change 'section' to be a kwarg instead of positionalXavier Claessens1-17/+8
Fixes: #6372.
2019-12-19add compiler.get_linker_id() methodMichael Hirsch, Ph.D2-0/+10
this can be useful for if/elif where linker behaviors must be considered. For example, clang with "link" vs gcc with "ld.bfd" etc. ci for compiler.get_linker_id() method doc add @FeatureNew check Co-Authored-By: Daniel Mensinger <daniel@mensinger-ka.de>
2019-12-19dependencies: refactor to use methods properlyMichael Hirsch, Ph.D5-163/+203
2019-12-19fs: rename samefile => is_samepathMichael Hirsch, Ph.D1-5/+5
is_samepath better reflects the nature of this function--that files and directories can be compared. Also, instead of raising exceptions, simply return False when one or both .is_samepath(path1, path1) don't exist. This is more intuitive behavior and avoids having an extra if fs.exist() to go with every fs.is_samepath()