aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2020-02-22symbolextractor: Add support for CygwinNirbheek Chauhan1-0/+26
2020-02-22symbolextractor: Add support for clang-clNirbheek Chauhan1-27/+37
Requires the latest LLVm 9.0 release which implements the `-list` argument to `llvm-lib` and ships with an implementation of `nm` called `llvm-nm`.
2020-02-22symbolextractor: Add a Windows implementationNirbheek Chauhan1-7/+80
Supports both MSVC and MinGW toolchains. Checks for MSVC first, then falls back to MinGW.
2020-02-22unit tests: Add a test for the symbolchecker scriptNirbheek Chauhan1-23/+23
When a source file for a library is changed without adding new extern symbols, only that library should be rebuilt. Nothing that uses it should be relinked. Along the way, also remove trailing `.` in all Ninja rule descriptions. It's very confusing to see messages like: ``` Linking target mylib.dll. ``` It's confusing that the period at the end of that is not part of the filename. Instead of removing that period manually in the tests (which feels wrong!) just don't print it at all.
2020-02-22ninjabackend: Pass the import library to SHSYMNirbheek Chauhan2-9/+16
We actually use this while linking on Windows, and hence we need to extract symbols from this file, and not the DLL. However, we cannot pass it instead of the DLL because it's an optional output of the compiler. It will not be written out at all if there are no symbols in the DLL, and we cannot know that at configure time. This means we cannot describe it as an output of any ninja target, or the input of any ninja target. We must pass it as an argument without semantic meaning.
2020-02-22ninjabackend: Minor refactoringNirbheek Chauhan1-2/+5
2020-02-22tests: Ensure that executable and library are named differentlyNirbheek Chauhan9-9/+16
On Windows, the basename is used to determine the name of the PDB file. So for a project called myproject, we will create myproject.dll and myproject.exe, both of which will have myproject.pdb. This is a file collision. Instead, append `_test`, similar to the C# template. Fixes AllPlatformTest.test_templates on MSVC. This became a hard error when we started listing PDBs in the implicit outputs list of ninja targets. Do the same for a test that was making the same mistake.
2020-02-22ninjabackend: List PDBs in output list for targetsNirbheek Chauhan4-10/+33
This is more correct, and forces the target(s) to be rebuilt if the PDB files are missing. Increases the minimum required Ninja to 1.7, which is available in Ubuntu 16.04 under backports. We can't do the same for import libraries, because it is impossible for us to know at configure time whether or not an import library will be generated for a given DLL.
2020-02-21coredata: Fix search and replace mistakeDylan Baker1-2/+2
A descriptive string had List replaced with T.List on accident.
2020-02-21coredata: Warn on reconfigure if PKG_CONFIG_PATH has changedDylan Baker1-11/+15
Fixes #6520 Fixes #5223
2020-02-21Merge pull request #6668 from ↵Jussi Pakkanen1-1/+19
mesonbuild/nirbheek/strip-more-unused-linkerlike-args macOS: Remove more unused linkerlike args
2020-02-21macOS: Remove more unused linkerlike argsNirbheek Chauhan1-1/+19
`-L` and `-headerpad_max_install_names` are both linker arguments that are commonly passed in CFLAGS too. Closes https://github.com/mesonbuild/meson/issues/6294
2020-02-21linkers: Update the linker names to be more consistentDylan Baker2-26/+50
This makes two basic changes, 1 it moves the name of the linker into the linker class, this should reduce the number of errors and typos, and ensure that a linker always has one name. This then renames the linkers to have more consistent names. Posix/gnu linkers are called ld.<name>: ld.gold, ld.lld, ld.solaris. Apple linkers are renamed ld64.
2020-02-21compilers/compilers: Fix get_linker_idDylan Baker1-1/+7
Which could raise an AttributeError when used on languages like Java and C# that don't have separate compilers and linkers.
2020-02-20msubprojects: We return a string from git() nowNirbheek Chauhan1-4/+4
Fixes https://github.com/mesonbuild/meson/issues/6651
2020-02-20Introduce dataonly for the pkgconfig moduleRohan Garg1-22/+38
This allows users to disable writing out the inbuilt variables to the pkg-config file as they might actualy not be required. One reason to have this is for architecture-independent pkg-config files in projects which also have architecture-dependent outputs. For example : https://gitlab.freedesktop.org/wayland/weston/issues/269 Fixes #4011
2020-02-20boost: Rewrite the boost system dependencyDaniel Mensinger1-600/+807
This PR significantly improves the handling of the boost library tags and also ensures that the found libraries are always compatible (have the same ABI tag). The current setup can also be extended to filter for additional features (static linking with the runtime, etc.). Additionally, BOOST_ROOT is better supported (it is now guaranteed that all found files belong to a single root directory). Finally, boost.py is now fully annotated (and checked with mypy).
2020-02-20cmake: Fix relative paths for add_custom_{command,target}Daniel Mensinger3-37/+120
Do this by tracking CMAKE_CURRENT_{SOURCE,BINARY}_DIR variables. This is achieved by injecting CMake code with CMAKE_PROJECT_INCLUDE and overriding some builtin functions with a wrapper that adds additional trace information.
2020-02-19make use of default project constMichael1-1/+1
2020-02-19make use of enumsMichael1-22/+24
2020-02-19removed hardcoded values for more add less work in the long run.Michael1-24/+27
2020-02-19switch Python list for setMichael1-3/+3
2020-02-19remove uneeded '(' and ')'Michael1-1/+1
2020-02-19cmake: Ignore files that violate subproject isolation (fixes #6640)Daniel Mensinger1-1/+13
2020-02-19Update minit.pyMichael Brockus1-52/+58
2020-02-19coredata: Fix crash when cmd_line_options contains booleansXavier Claessens1-2/+5
`meson setup --debug` puts a bool object in cmd_line_options dictionary that we have to convert to string. Fixes: #6646
2020-02-19cmake: traceparser better handle listsDaniel Mensinger1-3/+4
2020-02-19cmake: Fix dependency loops in custom targets (fixes #6632)Daniel Mensinger1-5/+18
2020-02-19modules/cmake: Add a found() method to the cmake subprojectDylan Baker1-0/+8
Just like the native meson subproject has.
2020-02-19modules/cmake: Use the noPosargs helperDylan Baker1-3/+2
2020-02-18linkers: typing -> T fixupDylan Baker1-1/+1
There was a particularly old MR merged, from before the typing -> T standardization in meson.
2020-02-18Don't pass --allow-shlib-undefined to lld if it's not supportedAndrei Alexeyev1-1/+12
Fixes builds with llvm-mingw
2020-02-17minstall: Add a new option --quietNirbheek Chauhan1-10/+18
This is a significant speed-up on Windows because terminals are slow to print things out. Speed-up in gst-build on Windows: ``` meson install: before: 5.1 seconds after: 4.0 seconds ```
2020-02-17minstall: Optimize when to call makedirs()Nirbheek Chauhan1-9/+11
In `--only-changed` mode, we were spending half our time inside `makedirs()`, which is a waste in the case when only a few files have changed. Speed-up on Windows with gst-build: ``` meson install --only-changed before: 1.6 seconds after: 0.9 seconds ```
2020-02-17minstall: Error out when trying to copy file to dirNirbheek Chauhan1-0/+1
Not sure why this wasn't already an error. It's a bad situation to be in, and we should not ignore it.
2020-02-17depfixer: Ignore more extensions that can't need RPATH fixesNirbheek Chauhan1-5/+4
Generated headers, PDB files, import libraries, etc. Speed-up in gst-build on Windows: ``` meson install before: 5.4 seconds after: 5.1 seconds meson install --only-changed before: 2.7 seconds after: 1.6 seconds ```
2020-02-17depfixer: Cache searching of install_name_toolNirbheek Chauhan1-1/+11
This gives a significant speedup in large projects such as gst-build since now we only search for the tool once. Speed-up on Windows: ``` meson install: before: 15.3 seconds after: 5.4 seconds meson install --only-changed: before: 11.6 seconds after: 2.7 seconds ```
2020-02-17minstall: Fix check for when something was installedNirbheek Chauhan1-10/+11
If we preserve the existing file, we did not install anything. In that case, the output now looks like: ``` ninja: Entering directory `.' ninja: no work to do. Nothing to install. Preserved 1732 unchanged files, see meson-logs\install-log.txt for the full list ``` This also avoids an `isfile` lookup, which shaves off a few seconds in gst-build install.
2020-02-17minstall: Add new hidden argument --profile-selfNirbheek Chauhan1-1/+9
Same purpose as `meson setup`.
2020-02-17symbolextractor: Add typing hintsNirbheek Chauhan1-6/+7
2020-02-17symbolextractor: Support passing arguments to toolsNirbheek Chauhan1-8/+13
This is how we parse all env vars for tools in Meson. Do the same here too for consistency.
2020-02-17symbolextractor: Print a warning if required tools not foundNirbheek Chauhan1-26/+49
Also write out a dummy symbols file if the tool wasn't found or didn't work instead of just spewing an exception.
2020-02-17mdist: Use windows_proof_rmtree when deletingNirbheek Chauhan1-4/+4
2020-02-17mdist: Don't delete builddir on dist failureNirbheek Chauhan1-26/+31
Closes https://github.com/mesonbuild/meson/issues/1976
2020-02-17modules/python: Do not error out if positional args are passedNirbheek Chauhan1-1/+5
Also update the documentation. Fixes https://github.com/mesonbuild/meson/issues/6470
2020-02-17version parsing: match only when version starts with a numberGerion Entrup2-2/+2
This leads to better version parsing. An concrete example use case is llc. When invoking llc with "--version", the output is ``` LLVM (http://llvm.org/): LLVM version 9.0.1 ... ``` The old version parsing recognizes the dot in the first line as version. This commit also tries to adapt the two regexes to each other. Reported-by: Björn Fiedler <fiedler@sra.uni-hannover.de>
2020-02-17base.py: remove trailing whitespaceGerion Entrup1-2/+2
2020-02-16symbolextractor: Correctly filter undefined symbols on macOSNirbheek Chauhan1-2/+4
-g is --extern-only and -P is --format=posix. We were missing --defined-only for some reason, which we pass to `nm` on Linux. This avoids having to manually filter later.
2020-02-16symbolextractor: Print one warning when no implementation foundNirbheek Chauhan2-7/+20
So people know why all their binaries are getting relinked. Do this only once per build-dir by writing a file to meson-private.
2020-02-16Popen_safe: Always re-setup the console colorsNirbheek Chauhan1-4/+9