aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-12-18linkers: Remove get_allow_undefined_args from link.exeDylan Baker1-2/+1
PE DLLs don't work like elf or mach-o, there's no way to define symbols at run time, they must all be defined as import or export at link time. As such there's no value in being able to have undefined symbols in MSVC, nor does meson expose an option to change them Fixes: #6342
2019-12-18PkgConfigDependency: Sort -L flags according to PKG_CONFIG_PATHTing-Wei Lan2-0/+60
When there is more than one path in PKG_CONFIG_PATH. It is almost always preferred to find things in the order specified by PKG_CONFIG_PATH instead of assuming pkg-config returns flags in a meaningful order. For example: /usr/local/lib/libgtk-3.so.0 /usr/local/lib/pkgconfig/gtk+-3.0.pc /usr/local/lib/libcanberra-gtk3.so /usr/local/lib/pkgconfig/libcanberra-gtk3.pc /home/mesonuser/.local/lib/libgtk-3.so.0 /home/mesonuser/.local/lib/pkgconfig/gtk+-3.0.pc PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig:/usr/local/lib/pkgconfig" libcanberra-gtk3 is a library which depends on gtk+-3.0. The dependency is mentioned in the .pc file with 'Requires', so flags from gtk+-3.0 are used in both dynamic and static linking. Assume the user wants to compile an application which needs both libcanberra-gtk3 and gtk+-3.0. The application depends on features added in the latest version of gtk+-3.0, which can be found in the home directory of the user but not in /usr/local. When meson asks pkg-config for linker flags of libcanberra-gtk3, pkg-config picks /usr/local/lib/pkgconfig/libcanberra-gtk3.pc and /home/mesonuser/.local/lib/pkgconfig/gtk+-3.0.pc. Since these two libraries come from different prefixes, there will be two -L arguments in the output of pkg-config. If -L/usr/local/lib is put before -L/home/mesonuser/.local/lib, meson will find both libraries in /usr/local/lib instead of picking libgtk-3.so.0 from the home directory. This can result in linking failure such as undefined references error when meson decides to put linker arguments of libcanberra-gtk3 before linker arguments of gtk+-3.0. When both /usr/local/lib/libgtk-3.so.0 and /home/mesonuser/.local/lib/libgtk-3.so.0 are present on the command line, the linker chooses the first one and ignores the second one. If the application needs new symbols that are only available in the second one, the linker will throw an error because of missing symbols. To resolve the issue, we should reorder -L flags according to PKG_CONFIG_PATH ourselves before using it to find the full path of library files. This makes sure that we always follow the preferences of users, without depending on the unreliable part of pkg-config output. Fixes https://github.com/mesonbuild/meson/issues/4271.
2019-12-18python: add embed to the python dependency functionDaniel Mensinger5-12/+27
2019-12-18Merge pull request #4649 from dcbaker/summary-functionJussi Pakkanen9-6/+265
Add a summary() function for configuration summarization
2019-12-17Merge pull request #6065 from dcbaker/pass-options-to-linker-detectionJussi Pakkanen17-135/+156
Pass options to linker detection
2019-12-17ci cmake: Windows link.exe skip due to symbol issuesMichael Hirsch, Ph.D10-12/+16
2019-12-17Fail gracefully detecting hdf5 if pkg-config is not available.Jussi Pakkanen1-8/+11
2019-12-17Fix macOS library test when using system zlib.Jussi Pakkanen1-1/+2
2019-12-16Clean MSI generator Try 2 [skip ci]Michael Brockus1-28/+85
2019-12-15default inc dirs: Fix warning on MSYS (fixes #6336)Daniel Mensinger1-5/+8
2019-12-14ci: type hint checking for compilers/mixins/intel.pyMichael Hirsch, Ph.D1-1/+1
2019-12-14intel/intel-cl: handle arguments in intel-specific wayMichael Hirsch, Ph.D1-20/+38
intel compiler's defaults are different enough from MSVC and GNU that it's necessary to set specific defaults for Intel compilers. This corrects/improves behaviors initially addressed in b1c8f765fa6e2a
2019-12-13run_tests.py: use mlog.log_once to avoid spamming ninja < 1.9 warningsDylan Baker1-3/+3
2019-12-13compilers: make use of mlog.log_onceDylan Baker2-6/+2
I'm sure there are other places that could use this, but I didn't see any right off that bat.
2019-12-13mlog: Add a log_once functionDylan Baker2-10/+67
There are a number of cases where we end up spamming users with the same message over and over again, which is really annoying. This solves that.
2019-12-13mlog: remove incorrect uses of global keywordDylan Baker1-2/+0
global is only needed to allow replacement of global values, they're always in scope to read.
2019-12-12summary: Add 'Subprojects' section to main projectXavier Claessens1-4/+20
2019-12-12summary: Add bool_yn keyword argumentXavier Claessens4-6/+21
2019-12-12summary: Allow section with no title, and passing key/value separatelyXavier Claessens5-26/+43
2019-12-12Add a summary() function for configuration summarizationXavier Claessens9-2/+213
Based on patch from Dylan Baker. Fixes #757
2019-12-13mintro: include test protocol in introspection dataPaolo Bonzini4-2/+8
2019-12-13ci fortran: add case where buildtype=release and warning_level=3Michael Hirsch, Ph.D2-0/+6
this can find issues with non-default build options
2019-12-12Consider compiler arguments in linker detection logicDylan Baker5-17/+23
If a user passes -fuse-ld=gold to gcc or clang, they expect that they'll get ld.gold, not whatever the default is. Meson currently doesn't do that, because it doesn't pass these arguments to the linker detection logic. This patch fixes that. Another case that this is needed is with clang's --target option This is a bad solution, honestly, and it would be better to use $LD or a cross/native file but this is needed for backwards compatability. Fixes #6057
2019-12-12Allow setting <lang>_args before the compiler is detectedDylan Baker3-99/+102
This is required to be able to pass compiler and linker arguments to the methods that try to guess what linker to use.
2019-12-12compilers: Make get_display_language a class or static methodDylan Baker7-12/+11
Currently this is done at the instance level, but we need it at the class level to allow compiler "lang" args to be gotten early enough. This patch also removes a couple of instance of branch/leaf classes providing their own implementation that is identical to the Compiler version.
2019-12-12compilers: move language attribute to the class levelDylan Baker12-13/+26
We know that if a compiler class inherits CCompiler it's language will be C, so doing this at the class level makes more sense.
2019-12-12docs: Fix wrong example for shaderc dependency [skip ci]ePirat1-12/+12
The example is meant for wxWidgets not Shaderc.
2019-12-11Merge pull request #6207 from dcbaker/linker-optionJussi Pakkanen15-174/+334
Add a way to select the dynamic linker meson uses
2019-12-11dependencies: Fix executable file test on Unix.Jonathan Perkin1-1/+3
access(2) tests for X_OK that return true do not always guarantee that the file is executable. Instead check the stat(2) mode bits explicitly. This fixes any builds or installs executed as root on Solaris and illumos that contain non-executable scripts.
2019-12-10dist: Fix --include-subprojects when .wrap file has directory valueXavier Claessens2-15/+23
2019-12-10mintro: Add version key to --scan-dependencies (fixes #6287)Daniel Mensinger6-6/+31
2019-12-10dep: Try extraframework before cmake (fixes #6113)Daniel Mensinger1-1/+3
2019-12-10cmake: subprocess external .decode(errors='ignore') to avoid tracebackMichael Hirsch, Ph.D1-9/+14
mesonlib.Popen_safe() doesn't work with the case where undecodeable binary data comes back from CMake or compiler, so we use subprocess.run()
2019-12-10docs: explain cross-compilation names sooner [skip ci]Marc Herbert1-12/+22
Meson's documentation about cross-compilation made me finally understand why the typical confusion about machine names. Thanks, but let's make it even better. Don't wait until the very end of the section to reveal the most important information: that machine names are relative. For suspense we already have TV shows; spill the beans much earlier. Also fix the first, simplest cross-compilation example: target is irrelevant.
2019-12-10run_unittests: Disable pytest with python <= 3.5Xavier Claessens1-0/+2
It's causing issues in some CI runners, it looks like it could be that bug: https://github.com/pytest-dev/pytest-xdist/issues/204.
2019-12-10assert(): Make message argument optionalXavier Claessens4-7/+29
2019-12-09azure: Fix vs2015Daniel Mensinger2-10/+6
2019-12-09cmake test: skip case where Cmake backend not Fortran-compatibleMichael Hirsch, Ph.D1-1/+4
2019-12-09cmake: add project language to cmakelists.txtMichael Hirsch, Ph.D8-15/+101
cmake: get language from Meson project if not specified as depedency(..., langugage: ...) deps: add threads method:cmake dependency('threads', method: 'cmake') is useful for cmake unit tests or those who just want to find threads using cmake. cmake: project(... Fortran) generally also requires C language
2019-12-09cmake: add fortran cache contentMichael Hirsch, Ph.D1-15/+37
2019-12-09run_command: Do not add dependency on /dev/stdoutXavier Claessens1-1/+1
Blacklist /dev paths, this fix infinite reconfigure when /dev/stdout is redirected to a file. Fixes: #6315.
2019-12-08dist: Add --include-subprojects optionXavier Claessens3-10/+79
2019-12-07Add brief description of configuring Vala's preprocessor via the ↵Ken Gilmer1-0/+5
add_project_arguments() function. [skip ci]
2019-12-07Fix typing import bug.Jussi Pakkanen1-1/+1
2019-12-07types: Add type annotations to mintro.pyDaniel Mensinger2-121/+94
2019-12-07run_project_tests: argparse(choices) for --only name checkMichael Hirsch, Ph.D1-7/+15
2019-12-07Merge pull request #6228 from scivision/scalapackJussi Pakkanen12-44/+514
deps: add Scalapack
2019-12-07catch malformed command line array option with helpful errorMichael Hirsch, Ph.D1-1/+4
fixes #6291
2019-12-07type annoMichael Hirsch, Ph.D1-2/+2
2019-12-06Update Python2 syntax to Python3 syntax in genrelnotes.pyMichael Brockus1-16/+26