summaryrefslogtreecommitdiff
path: root/mesonbuild/backend
Commit message (Collapse)AuthorAgeFilesLines
...
* Call it gnu_symbol_visibility instead.Jussi Pakkanen2018-08-091-1/+1
|
* Add kwarg for specifying symbol visibility.Jussi Pakkanen2018-08-091-0/+2
|
* Don't require an import library for shared modulesNirbheek Chauhan2018-08-091-3/+5
| | | | | | | | | | Shared modules may be resource-only DLLs, or might automatically self-initialize using C constructors or WinMain at DLL load time. When an import library is not found for a shared module, just print a message about it instead of erroring out. Fixes #3965
* Fix @CURRENT_SOURCE_DIR@ in generator()Emil Styrke2018-08-071-1/+1
| | | | Fix @CURRENT_SOURCE_DIR@ pointing to the wrong directory if generator() is called from a subdir.
* custom targets: Add a 'console' kwarg for long-running commandsNirbheek Chauhan2018-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | Ninja buffers all commands and prints them only after they are complete. Because of this, long-running commands such as `cargo build` show no output at all and it's impossible to know if the command is merely taking too long or is stuck somewhere. To cater to such use-cases, Ninja has a 'pool' with depth 1 called 'console', and all processes in this pool have the following properties: 1. stdout is connected to the program, so output can be seen in real-time 2. The output of all other commands is buffered and displayed after a command in this pool finishes running 3. Commands in this pool are executed serially (normal commands continue to run in the background) This feature is available since Ninja v1.5 https://ninja-build.org/manual.html#_the_literal_console_literal_pool
* Merge pull request #3850 from mesonbuild/nirbheek/exe-wrapper-compiler-fallbacksJussi Pakkanen2018-07-313-17/+34
|\ | | | | Be more permissive about not-found exe_wrapper
| * cross: Be more permissive about not-found exe_wrappernirbheek/exe-wrapper-compiler-fallbacksNirbheek Chauhan2018-07-093-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to immediately try to use whatever exe_wrapper was defined in the cross file, but some people generate the cross file once and use it for several projects, most of which do not even need an exe wrapper to build. Now we're a bit more resilient. We quietly fall back to using non-exe-wrapper paths for compiler checks and skip the sanity check. However, if some code needs the exe wrapper, f.ex., if you run a built executable using custom_target() or run_target(), we will error out during setup. Tests will, of course, continue to error out when you run them if the exe wrapper was not found. We don't want people's tests to silently "pass" (aka skip) because of a bad CI setup. Closes https://github.com/mesonbuild/meson/issues/3562 This commit also adds a test for the behaviour of exe_wrapper in these cases, and refactors the unit tests a bit for it.
| * cross: Use ExternalProgram for cross-file exe_wrapperNirbheek Chauhan2018-07-092-10/+12
| | | | | | | | | | | | We already have code to fetch and find binaries specified in a cross file, so use the same code for exe_wrapper. This allows us to handle the same corner-cases that were fixed for other cross binaries.
* | Merge pull request #3898 from mesonbuild/vsinstallJussi Pakkanen2018-07-273-222/+302
|\ \ | | | | | | Add install target to VS
| * | Added install target to VS. Closes #3841.vsinstallJussi Pakkanen2018-07-223-7/+82
| | |
| * | Moved install data file generation to base class.Jussi Pakkanen2018-07-172-218/+223
| | |
* | | Make the rpath order deterministic. (#3932)Rafael Ávila de Espíndola2018-07-251-1/+1
| | |
* | | Make the dependency order deterministic. (#3927)Rafael Ávila de Espíndola2018-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | We were using sets to store the dependencies. Just switch to OrderedSet. Fixes #3922.
* | | Handle transitive links to 'threads' dependencies. (#3895)Rafael Ávila de Espíndola2018-07-191-7/+14
|/ / | | | | | | | | | | | | | | Meson already had code to propagate link dependencies from static libraries to programs that use those static libraries. Unfortunately, it was not handling the special cases of 'threads' and 'openmp' dependencies.
* | Fix searching of shared libraries on OpenBSD (#3851)Nirbheek Chauhan2018-07-091-17/+28
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * get_library_naming: Use templates instead of suffix/prefix pairs This commit does not change functionality, and merely sets the groundwork for a more flexibly naming implementation. * find_library: Fix manual searching on OpenBSD On OpenBSD, shared libraries are called libfoo.so.X.Y where X is the major version and Y is the minor version. We were assuming that it's libfoo.so and not finding shared libraries at all while doing manual searching, which meant we'd link statically instead. See: https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs Now we use file globbing to do searching, and pick the first one that's a real file. Closes https://github.com/mesonbuild/meson/issues/3844 * find_library: Fix priority of library search in OpenBSD Also add unit tests for the library naming function so that it's absolutely clear what the priority list of naming is. Testing is done with mocking on Linux to ensure that local testing is easy
* java: prevent creation of manifest duplicate in jarNiclas Moeslund Overby2018-07-031-1/+1
|
* java: add jar linking testNiclas Moeslund Overby2018-07-031-3/+3
|
* java: implement java linkingNiclas Moeslund Overby2018-07-031-1/+14
|
* ArLinker: Use response files on WindowsMathieu Duponchelle2018-06-251-6/+2
| | | | | | | | | | ninja chokes when building FFmpeg's static libraries, as the command line can be larger than 32000. This was disabled on purpose in #1649, but the rsp syntax was different: this commit makes it so the options and output file are still passed on the command line, gcc-ar didn't work otherwise.
* Merge pull request #3590 from mesonbuild/testcommandJussi Pakkanen2018-06-211-1/+1
|\ | | | | Made install a top level Meson command.
| * Made install a top level Meson command.Jussi Pakkanen2018-06-181-1/+1
| |
* | Rename clike_langs to clink_langs for clarityNirbheek Chauhan2018-06-201-1/+1
| | | | | | | | | | | | | | D is not a 'c-like' language, but it can link to C libraries. The same might be true of Rust in the future and Go when we add support for it. This contains no functionality changes.
* | ninjabackend: Obvious typo, missing spaceNirbheek Chauhan2018-06-201-1/+1
|/ | | | I checked the original commit, and that space should not be there.
* Correctly substitute the internal @BUILD_ROOT@ token with MSVC backendJon Turney2018-06-181-1/+1
| | | | | To me, this looks like a mistake in 976c9abc, but perhaps there's something I don't understand going on here.
* Deprecate `build_always`, add `build_always_stale`Alex Hirsch2018-06-182-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
* macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan2018-06-182-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.
* Support Rust targets with more than one source file. Closes #3632.Jussi Pakkanen2018-06-171-3/+9
|
* Visual Studio: Implement startup projectNiklas Claesson2018-06-101-2/+11
|
* backends: Don't exclude system libraries for PATHNirbheek Chauhan2018-06-071-3/+3
| | | | | We reuse the same function for generating PATH, and we don't want to exclude system paths there for obvious reasons.
* backends: Don't hardcode system library pathsNirbheek Chauhan2018-06-071-5/+12
| | | | | | Lookup the library paths using the available compilers instead. This makes the code work on non-Linux platforms too.
* Install shared_module implibsJon Turney2018-06-071-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.
* Fix issues found by flake8Xavier Claessens2018-06-061-1/+1
|
* Move <lang>_args to coredata.compiler_optionsXavier Claessens2018-06-063-6/+7
|
* Add a new option for building with Apple bitcode supportNirbheek Chauhan2018-06-062-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.
* Add prog/lib dirs from the mingw cross-compiler to PATHNirbheek Chauhan2018-06-051-7/+12
| | | | | These directories contain DLLs that the executable may need, such as libstdc++-6.dll, libwinpthread, etc.
* Automatically add cross-mingw root and sysroot bindir to WINEPATHNirbheek Chauhan2018-06-052-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
* Set WINEPATH when running serialized executablesNirbheek Chauhan2018-06-052-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
* Allow substitutions in custom_target() depfile:Jon Turney2018-06-031-1/+2
| | | | Allow substitutions in custom_target() depfile: as well as in command:
* Install implib where expected if default install_dir: is explicitly givenJon Turney2018-06-031-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.
* test extra paths: add extra paths for all build targetsMathieu Duponchelle2018-06-021-2/+2
|
* test serialisation: determine windows extra paths ..Mathieu Duponchelle2018-06-021-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.
* Add 'install_mode' to all installable targetsFilipe Brandenburger2018-06-021-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.
* backends: Also accept dylibs while finding RPATHsNirbheek Chauhan2018-05-241-1/+3
|
* backends: Simplify loop getting rpaths for bundled libsNirbheek Chauhan2018-05-241-17/+19
| | | | No functionality changes
* backends: Use a set while gathering RPATHsNirbheek Chauhan2018-05-241-8/+4
|
* ninja: add build dir to javac -sourcepathRobert Bragg2018-05-161-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.
* ninja: avoid needing include_directory('.') with jar()Robert Bragg2018-05-161-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.
* ninja: pass separated paths to javac -sourcepathRobert Bragg2018-05-161-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.
* vala: Fix shared_module linking with export_dynamic executableNirbheek Chauhan2018-05-101-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
* Revert "Add macOS linker versioning information"Nirbheek Chauhan2018-05-091-1/+1
| | | | | | This reverts commit fa6ca160548d7e8df9c4c724e6c96f5e004e5316. Closes https://github.com/mesonbuild/meson/issues/3550