summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass --gresources to valac for each compiled gresourceNirbheek Chauhan2016-12-151-13/+22
| | | | | | | | Without this, the user has to both compile the resource with gnome.compile_resources, pass that to the target sources, and also pass --gresources=/path/to/gres.xml to vala_args in the target. With this, we will do that automatically.
* Query the target itself for the dynamic linkerNirbheek Chauhan2016-12-131-28/+10
| | | | | | | | | This greatly improves the logic for determining the linker. Previously, we would completely break if a target contained only extracted objects and we were using more than one compiler in our project. This also fixes determination of the linker if our target only contains generated objc++ sources, and other funky combinations.
* Also use objects to populate target compilersNirbheek Chauhan2016-12-131-0/+2
| | | | | | | | | This avoids us having no compilers at all for targets that are composed entirely of objects with no sources. Now we will always have a compiler for a target even if it is composed entirely of objects generated with custom targets unless it has completely unknown sources.
* Only check for unity compat when doing unity buildsNirbheek Chauhan2016-11-241-6/+2
| | | | | | | Also don't bother setting self.unity_compatible since it will never be checked. Closes #1097
* Removed Valgrind from core.Jussi Pakkanen2016-11-181-3/+2
|
* Add new add_project_[link]_args functionsThibault Saunier2016-11-121-0/+1
| | | | Fixes 979
* Fix regex used in custom target evaluationNirbheek Chauhan2016-11-121-2/+8
| | | | | | | | | Instead of using a whitelist, use a blacklist. Also print a more useful error if the regex fails to match. Use an underscore in the gir test to trigger this. Fixes #436
* vala: Fix compiled object extractionNirbheek Chauhan2016-11-121-0/+3
| | | | Fixes #791
* backends: Output depfiles in same directory as targetPatrick Griffis2016-11-091-4/+1
|
* custom_target: Substitute @OUTPUT@ and @INPUT properlyNirbheek Chauhan2016-11-091-26/+43
| | | | | | | They weren't being substituted if they were a part of a command argument, ala --output=@OUTPUT@, etc. Closes https://github.com/mesonbuild/meson/issues/824
* Implement mlog.warning and use it everywhere for warningsNirbheek Chauhan2016-11-081-2/+2
| | | | | | Prepends the string with 'WARNING:' in ANSI yellow. Closes https://github.com/mesonbuild/meson/issues/961
* Use a cross linker when cross compiling.Jussi Pakkanen2016-11-061-5/+9
|
* Allow running native executable in cross buildMark Schulte2016-10-271-1/+5
| | | | | | Make so both executable() targets that are marked as native and external programs (which are usually build tools compiled for the host machine) are not supposed to be run with the exe wrapper.
* Add support for extracting objects in unity buildsNirbheek Chauhan2016-10-211-44/+37
| | | | | | | | | | Not only does extract_all_objects() now work properly again, extract_objects() also works if you specify a subset of sources all of which have been compiled into a single unified object. So, for instance, this allows you to extract all the objects corresponding to the C sources compiled into a target consisting of C and C++ sources.
* Print a useful error when unable to determine linkerNirbheek Chauhan2016-10-211-1/+1
|
* Ninja: Consolidate generated sources handlingNirbheek Chauhan2016-10-191-0/+13
| | | | | | | | | | | | Pre-calculate the output directory for GeneratedList and CustomTarget so we can directly use the same code for both while compiling C/C++ files and headers. There is no reason to have separate branches for GeneratedList and CustomTarget since both can be used in almost exactly the same way for generating sources. This is going to used next for adding generated sources support to Vala.
* CustomTarget: Use get_outputs() instead of get_filename()Nirbheek Chauhan2016-10-191-14/+16
| | | | | | | | get_filename() made no sense for CustomTarget since it can have multiple outputs. Also use get_outputs() for GeneratedList since it has the same meaning and remove unused set_generated(). As a side-effect, we now install all the outputs of a CustomTarget.
* Add no-warning args while building Vala C codeNirbheek Chauhan2016-10-141-2/+5
| | | | | | | | | | | This is done by adding a new compiler method called 'no_warn_args' which returns the argument(s) required for the compiler to emit no warnings for that compilation. This take care of not disabling warnings for C code compiled into the BuildTarget. Also includes tests for ensuring all this. https://github.com/mesonbuild/meson/issues/864
* Add cross-platform PIC support for static librariesNirbheek Chauhan2016-10-081-0/+2
| | | | | | | | | | | | With C/C++, on Windows you don't need to pass any arguments for a static library to be PIC. On UNIX platforms you need to pass -fPIC. Other languages such as D have compiler-specific PIC arguments required for PIC support in static libraries on UNIX platforms. This kwarg allows people to specify which static libraries should be built with PIC support. This is usually used for static libraries that will be linked into shared libraries.
* Merge pull request #803 from centricular/generated-sources-header-depsJussi Pakkanen2016-10-011-1/+0
|\ | | | | ninja backend: Fix header deps of generated source compiles
| * backends: Remove self.dep_rules dead codeNirbheek Chauhan2016-10-021-1/+0
| | | | | | | | | | | | self.dep_rules is not set anywhere by anything, so this code always results in a no-op. If it didn't result in a no-op, it would need to be seriously rewritten because it has bitrotten and makes no sense anymore.
* | Fix missing comma in backend.Backend.dedup_arguments()Sam Thursfield2016-10-011-1/+1
| | | | | | | | | | This error meant that -I flags passed to the compiler were never actually deduplicated.
* | Merge pull request #814 from centricular/heavy-cleanup-compilers-buildtargetsJussi Pakkanen2016-09-301-21/+0
|\ \ | | | | | | Heavy cleanup in compilers and BuildTarget
| * | Use per-target compilers while generating targetsNirbheek Chauhan2016-09-271-21/+0
| |/ | | | | | | | | | | This is definitely more correct since it takes into account the cross-compilation status. We also now do the Java and CSharp sanity checks on the BuildTarget level instead of in the Ninja backend.
* | Deduplicate command line arguments. Slight improvement to #671.Jussi Pakkanen2016-09-281-0/+21
|/
* ninja: Fix checking of exe_wrapper for CustomTargets (#806)Nirbheek Chauhan2016-09-251-1/+1
| | | It was making a trivially incorrect check
* Revert #737. Closes #773.Jussi Pakkanen2016-09-121-0/+19
|
* Merge pull request #684 from mesonbuild/pdbJussi Pakkanen2016-09-111-0/+6
|\ | | | | Create pdb files with MSVC
| * ninjabackend: Add support for installing .pdb filesNirbheek Chauhan2016-09-111-0/+6
| | | | | | | | | | | | .pdb files are files created by MSVC which have debug symbols. These are created when /ZI or /Zi is passed to the compiler and /DEBUG to the linker.
* | Merge branch 'QuLogic-context-managers'Jussi Pakkanen2016-09-011-25/+34
|\ \
| * | Use context manager for file I/O.Elliott Sales de Andrade2016-08-271-25/+34
| | | | | | | | | | | | | | | There are a few cases where a context manager cannot be used, such as the logger.
* | | Stop "fixing" command line in CustomTargets. (#737)Elliott Sales de Andrade2016-09-011-1/+0
| | |
* | | Use absolute paths for dep files in Visual Studio.Jussi Pakkanen2016-09-011-1/+4
| | |
* | | Properly handle Files used in CustomTarget commands.Elliott Sales de Andrade2016-08-291-1/+1
| | |
* | | Fix CustomTargets used as input to CustomTargets. (#727)Elliott Sales de Andrade2016-08-281-1/+1
|/ /
* | Merge pull request #696 from mesonbuild/depfileJussi Pakkanen2016-08-271-1/+5
|\ \ | | | | | | Add support for dependency files in custom targets.
| * | Add support for dependency files in custom targets.Jussi Pakkanen2016-08-201-1/+5
| |/
* | Flatten isinstance calls. (#715)Elliott Sales de Andrade2016-08-271-2/+1
| | | | | | | | That is, isinstance(x, y) or isinstance(x, z) can be flattened with a tuple to isinstance(x, (y, z)).
* | Allow capturing command output of a custom target.Elliott Sales de Andrade2016-08-261-3/+5
| | | | | | | | | | | | For commands that always output to stdout and don't have a "-o" or "--output" or some other similar option, this 'capture' setting allows the build to capture the result and place it in the output file.
* | Accept string exe with Backend.serialise_executable.Elliott Sales de Andrade2016-08-261-4/+10
| | | | | | | | | | | | Normally, this accepts a build.Executable, but it accept build.BuildTarget and build.CustomTarget as well. Now it will also accept a string path.
* | Implement D supportMatthias Klumpp2016-08-191-1/+8
|/ | | | | | | | | | | This patch adds support for the D programming language[1] to Meson. The following compilers are supported: * LDC * GDC * DMD [1]: http://dlang.org/
* ninja: Add escaping for backslash in -D argumentsNirbheek Chauhan2016-07-291-1/+28
| | | | | This is only needed for defines. Other arguments such as -I and /Fa that also take arguments with spaces and backslashes don't need it at all.
* Merge pull request #417 from nirbheek/dll-pathsJussi Pakkanen2016-07-131-4/+16
|\ | | | | Fix filenames and paths used in DLL shared library generation
| * CustomTarget: Use mesonlib.File objects as-is in the command to be runNirbheek Chauhan2016-07-011-0/+4
| | | | | | | | | | | | This allows us to output either the relative or absolute path as requested. Fixes usage of configure_file inside CustomTarget commands with the VS backends.
| * backend: Raise a RuntimeError if an unknown object is added to the command listNirbheek Chauhan2016-07-011-1/+5
| | | | | | | | This allows us to catch these errors early and print a useful message
| * Overhaul versioning and naming of librariesNirbheek Chauhan2016-07-011-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains several changes to the naming and versioning of shared and static libraries. The details are documented at: https://github.com/mesonbuild/meson/pull/417 Here's a brief summary: * The results of binary and compiler detection via environment functions are now cached so that they can be called repeatedly without performance penalty. This is necessary because every build.SharedLibrary object has to know whether the compiler is MSVC or not (output filenames depend on that), and so the compiler detection has to be called for each object instantiation. * Linux shared libraries don't always have a library version. Sometimes only soversions are specified (and vice-versa), so support both. * Don't use versioned filenames when generating DLLs, DLLs are never versioned using the suffix in the way that .so libraries are. Hence, they don't use "aliases". Only Linux shared libraries use those. * OS X dylibs do not use filename aliases at all. They only use the soversion in the dylib name (libfoo.X.dylib), and that's it. If there's no soversion specified, the dylib is called libfoo.dylib. Further versioning in dylibs is supposed to be done with the -current_version argument to clang, but this is TBD. https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW23 * Install DLLs into bindir and import libraries into libdir * Static libraries are now always called libfoo.a, even with MSVC * .lib import libraries are always generated when building with MSVC * .dll.a import libraries are always generated when building with MinGW/GCC or MinGW/clang * TODO: Use dlltool if available to generate .dll.a when .lib is generated and vice-versa. * Library and executable suffix/prefixes are now always correctly overriden by the values of the 'name_prefix' and 'name_suffix' keyword arguments.
* | Gcc versions older than 4.9 do not support color output.Jussi Pakkanen2016-07-011-3/+4
| |
* | Changed run_target to take command as kwarg and add depends. This makes it ↵Jussi Pakkanen2016-06-241-0/+4
|/ | | | behave the same as custom_target.
* Octopus merged cross fixes and genetor custom because why not.Jussi Pakkanen2016-06-161-5/+7
|\
| * Can use generator outputs in custom targets. Closes #587.Jussi Pakkanen2016-06-131-5/+7
| |