aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
AgeCommit message (Collapse)AuthorFilesLines
2018-06-18Made install a top level Meson command.Jussi Pakkanen1-1/+1
2018-06-18Correctly substitute the internal @BUILD_ROOT@ token with MSVC backendJon Turney1-1/+1
To me, this looks like a mistake in 976c9abc, but perhaps there's something I don't understand going on here.
2018-06-18Deprecate `build_always`, add `build_always_stale`Alex Hirsch2-2/+2
Since `build_always` also adds a target to the set of default targets, this option is marked deprecated in favour of the new option `build_always_stale`. `build_always_stale` *only* marks the target to be always considered out of date, but does *not* add it to the set of default targets. The old behaviour can still be achieved by combining `build_always_stale` with `build_by_default`. fixes #1942
2018-06-18macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan2-39/+76
On macOS, we set the install_name for built libraries to @rpath/libfoo.dylib, and when linking to the library, we set the RPATH to its path in the build directory. This allows all built binaries to be run as-is from the build directory (uninstalled). However, on install, we have to strip all the RPATHs because they point to the build directory, and we change the install_name of all built libraries to the absolute path to the library. This causes the install name in binaries to be out of date. We now change that install name to point to the absolute path to each built library after installation. Fixes https://github.com/mesonbuild/meson/issues/3038 Fixes https://github.com/mesonbuild/meson/issues/3077 With this, the default workflow on macOS matches what everyone seems to do, including Autotools and CMake. The next step is providing a way for build files to override the install_name that is used after installation for use with, f.ex., private libraries when combined with the install_rpath: kwarg on targets.
2018-06-17Support Rust targets with more than one source file. Closes #3632.Jussi Pakkanen1-3/+9
2018-06-10Visual Studio: Implement startup projectNiklas Claesson1-2/+11
2018-06-07backends: Don't exclude system libraries for PATHNirbheek Chauhan1-3/+3
We reuse the same function for generating PATH, and we don't want to exclude system paths there for obvious reasons.
2018-06-07backends: Don't hardcode system library pathsNirbheek Chauhan1-5/+12
Lookup the library paths using the available compilers instead. This makes the code work on non-Linux platforms too.
2018-06-07Install shared_module implibsJon Turney1-1/+1
On Windows, if we are going to link with a shared module, we need the implib. Use case: The Xorg server builds some X protocol extensions as modules. The implibs for these modules need to be shipped as part of the SDK, to enable building of 3rd party extensions which reference symbols in (and hence on Windows, need to be linked with) these modules.
2018-06-06Fix issues found by flake8Xavier Claessens1-1/+1
2018-06-06Move <lang>_args to coredata.compiler_optionsXavier Claessens3-6/+7
2018-06-06Add a new option for building with Apple bitcode supportNirbheek Chauhan2-2/+4
Normally, people would just pass -fembed-bitcode in CFLAGS, but this conflicts with -Wl,-dead_strip_dylibs and -bundle, so we need it as an option so that those can be quietly disabled.
2018-06-05Add prog/lib dirs from the mingw cross-compiler to PATHNirbheek Chauhan1-7/+12
These directories contain DLLs that the executable may need, such as libstdc++-6.dll, libwinpthread, etc.
2018-06-05Automatically add cross-mingw root and sysroot bindir to WINEPATHNirbheek Chauhan2-11/+25
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-05Set WINEPATH when running serialized executablesNirbheek Chauhan2-3/+11
When the exe runner is `wine` or `wine32` or `wine64`, etc. This allows people to run tests with wine. Note that you also have to set WINEPATH to point to your custom prefix(es) if your tests use external dependencies. Closes https://github.com/mesonbuild/meson/issues/3620
2018-06-03Allow substitutions in custom_target() depfile:Jon Turney1-1/+2
Allow substitutions in custom_target() depfile: as well as in command:
2018-06-03Install implib where expected if default install_dir: is explicitly givenJon Turney1-13/+17
Install the implib into the default import lib directory if an explicit install_dir: is given, but the value happens to be the same as the default.
2018-06-02test extra paths: add extra paths for all build targetsMathieu Duponchelle1-2/+2
2018-06-02test serialisation: determine windows extra paths ..Mathieu Duponchelle1-0/+2
.. for executable arguments too. This makes it possible to pass an executable to a test, which can then run it in an appropriate environment.
2018-06-02Add 'install_mode' to all installable targetsFilipe Brandenburger1-7/+8
This makes it possible to customize permissions of all installable targets, such as executable(), libraries, man pages, header files and custom or generated targets. This is useful, for instance, to install setuid/setgid binaries, which was hard to accomplish without access to this attribute.
2018-05-24backends: Also accept dylibs while finding RPATHsNirbheek Chauhan1-1/+3
2018-05-24backends: Simplify loop getting rpaths for bundled libsNirbheek Chauhan1-17/+19
No functionality changes
2018-05-24backends: Use a set while gathering RPATHsNirbheek Chauhan1-8/+4
2018-05-16ninja: add build dir to javac -sourcepathRobert Bragg1-0/+1
To allow the javac -implicit:class behaviour to know where to find generated .java files then the build directory for the target is also added to the -sourcefile path.
2018-05-16ninja: avoid needing include_directory('.') with jar()Robert Bragg1-3/+3
Although only one file is passed to javac at a time, if your code has any inter-file dependencies javac still needs to know how to find other source files for its -implicit:class feature to work whereby it will automatically also compile files that the given file depends on. -implicit:class is the default, practical, behaviour of javac since otherwise it would be necessary to declare the class dependencies for parallel java builds to be feasible. Passing "include_directory: include_directory('.')" to jar() causes -souredir <path/to/top/of/java/src> to be passed to javac which then enables your source code to have inter-file class dependencies - assuming none of your source code is generated. This ensures that '.' is included by default.
2018-05-16ninja: pass separated paths to javac -sourcepathRobert Bragg1-1/+4
The -sourcepath option can't be passed multiple times to javac, since it simply overrides prior arguments. Instead -sourcepath takes a colon (or semi-colon on windows) separated list of paths.
2018-05-10vala: Fix shared_module linking with export_dynamic executableNirbheek Chauhan1-1/+3
Need to generate a vapi and a header, and then use that in the shared module. Needed for GNOME games. Closes https://github.com/mesonbuild/meson/issues/3538
2018-05-09Revert "Add macOS linker versioning information"Nirbheek Chauhan1-1/+1
This reverts commit fa6ca160548d7e8df9c4c724e6c96f5e004e5316. Closes https://github.com/mesonbuild/meson/issues/3550
2018-05-02Can combine D and C++ in a single target. Closes #3125.Jussi Pakkanen2-12/+9
2018-05-01 Allow custom_target do depend on indexed output of custom_target Niklas Claesson1-1/+1
Fixes: #3494
2018-04-27guess_external_link_dependencies: deduplicate search dirs and libraries.Martin Hostettler1-6/+7
Reduce speed impact of duplicated libs and pathes in the link command line. (fixes #3465)
2018-04-26Merge pull request #3225 from filbranden/fixperms3Jussi Pakkanen2-2/+6
Introduce install_umask to determine permissions of files in install tree. Default it to 022
2018-04-26Merge pull request #3372 from NickeZ/vs-sol-foldersJussi Pakkanen1-20/+68
Use visual studio solution directories
2018-04-21ninja backend: Fix shared library symbols pathNirbheek Chauhan1-3/+4
The entire subdirectory was getting duplicated, which was exceeding the max path limit in Python on Windows and causing build failures. Example: subprojects/gst-plugins-bad/gst-libs/gst/uridownloader/subprojects@gst-plugins-bad@gst-libs@gst@uridownloader@@gsturidownloader-1.0@sha/subprojects/gst-plugins-bad/gst-libs/gst/uridownloader/gsturidownloader-1.0-0.dll.symbols This path is too long and opening it will cause a FileNotFoundError on Windows.
2018-04-21Fix Fortran dep hack when cross-compiling.Elliott Sales de Andrade1-6/+6
2018-04-20Merge pull request #3404 from xclaesse/extract-recursiveJussi Pakkanen3-31/+37
extract_all_objects(): Recursively extract objects
2018-04-19cache the generated headers for each targetBruce Richardson1-0/+3
Once we calculate the generated headers for a target we can cache them to speed up future calls for that target.
2018-04-18extract_all_objects: Add 'recursive' keyword argumentXavier Claessens1-1/+2
To maintain backward compatibility we cannot add recursive objects by default. Print a warning when there are recursive objects to be pulled and the argument is not set. After a while we'll do pull recursive objects by default.
2018-04-18extract_all_objects(): Recursively extract objectsXavier Claessens1-1/+9
Fixes #3401
2018-04-18Fix using object extracted from a unity buildXavier Claessens3-30/+27
- determine_ext_objs: What matters is if extobj.target is a unity build, not if the target using those objects is a unity build. - determine_ext_objs: Return one object file per compiler, taking into account generated sources. - object_filename_from_source: No need to special-case unity build, it does the same thing in both code paths. - check_unity_compatible: For each compiler we must extract either none or all its sources, taking into account generated sources.
2018-04-18Add new builtin option --install-umaskFilipe Brandenburger2-2/+6
This option controls the permissions of installed files (except for those specified explicitly using install_mode option, e.g. in install_data rules.) An install-umask of 022 will install all binaries, directories and executable files with mode rwxr-xr-x, while all data and non-executable files will be installed with mode rw-r--r--. Setting install-umask to the string 'preserve' will disable this feature, keeping the permissions of installed files same as the files in the build tree (or source tree for install_data and install_subdir.) Note that, in this case, the umask used when building and that used when checking out the source tree will leak into the install tree. Keep the default as 'preserve', to show that no behavior is changed and all tests keep passing unchanged. Tested: ./run_tests.py
2018-04-17Use visual studio solution directoriesNiklas Claesson1-17/+65
This implements support for visual studio solution directories. Projects will by default be put into directories that map their sub-directory name in the source folder. No directories are created if `--layout=flat` is used. Fixes: #2524
2018-04-17Fix vs flat layout bugNiklas Claesson1-4/+4
2018-04-18Merge pull request #3314 from sarum9in/test_dependsJussi Pakkanen1-0/+3
Add test(depends) keyword parameter
2018-04-17Merge pull request #1852 from QuLogic/openmpJussi Pakkanen3-3/+16
Add an OpenMP dependency.
2018-04-17Open build files with utf-8Nirbheek Chauhan2-6/+6
2018-04-17Add an OpenMP dependency.Elliott Sales de Andrade3-3/+16
This works similarly to the thread dependency which stores the various inconsistent flags in each compiler.
2018-04-16Merged Arm CC support.Jussi Pakkanen1-4/+4
2018-04-16Add macOS linker versioning informationTom Schoonjans1-1/+1
This patch exploits the information residing in ltversion to set the -compatibility_version and -current_version flags that are passed to the linker on macOS.
2018-04-15cross: Add compiler cross_args after normal argsNirbheek Chauhan1-5/+5
This way they override all other arguments. This matches the order of link arguments too. Note that this means -I flags will come in afterwards and not override anything else, but this is correct since that's how toolchain paths work normally too -- they are searched last. Closes https://github.com/mesonbuild/meson/issues/3089