aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
AgeCommit message (Collapse)AuthorFilesLines
2017-08-04Add option to disable implicit include directories. Closes #2139.dotincludeJussi Pakkanen2-5/+11
2017-07-24Ensure same compiler flags are used for compiling PCH as normal sourcesGabrĂ­el ArthĂșr PĂ©tursson1-3/+3
Precompiled headers should generally be compiled with the same flags as the sources that will include the header. Some deviations are safe, however, most will cause the compiler to reject the precompiled header or possibly lead to compiler crashes.
2017-07-23Consider `link_whole` as well as `link_with` for Vala depsSam Thursfield1-1/+1
Otherwise, when you have a static helper library written in Vala that you want to `link_whole` into a shared library you have to manually add the .vapi file as a source.
2017-07-22add `crate-name` to Rust target argsAdam C. Foltzer1-0/+1
This is required for downstream Rust dependencies to properly import libraries using `extern crate`.
2017-07-21Merged buildrpath branch.Jussi Pakkanen1-0/+2
2017-07-21Fix run_target() accepting ConfigureFile for commandPatrick Griffis1-0/+2
2017-07-21Add build_rpath as new property allowing people to specify rpath entries ↔Jussi Pakkanen1-0/+2
that are used in the build tree but will be removed on install.
2017-07-20Support implibs for executables on WindowsJon Turney3-7/+19
Add a boolean 'implib' kwarg to executable(). If true, it is permitted to use the returned build target object in link_with: On platforms where this makes sense (e.g. Windows), an implib is generated for the executable and used when linking. Otherwise, it has no effect. (Rather than checking if it is a StaticLibrary or SharedLibary, BuildTarget subclasses gain the is_linkable_target method to test if they can appear in link_with:) Also install any executable implib in a similar way to a shared library implib, i.e. placing the implib in the appropriate place Add tests of: - a shared_module containing a reference to a symbol which is known (at link time) to be provided by the executable - trying to link with non-implib executables (should fail) - installing the implib (This last one needs a little enhancement of the installed file checking as this is the first install test we have which needs to work with either MSVC-style or GCC-style implib filenames)
2017-07-20Allow test to depend on executable target in cross build. (#2007)FredericHamel1-0/+2
* Add a crossbuild case in 'test case/common/1 trivial/meson.build' * Add native flags for crossbuild tests.
2017-07-18Revert "Merge pull request #1931 from centricular/use-patched-ninja"Jussi Pakkanen1-5/+6
This reverts commit aab7ada356e02033e4030143cf363d06d975283b, reversing changes made to e1b24765afd9e7d2d8043a408d69c7ad814d3551.
2017-07-17ninja backend: Detect ninja only once and log itNirbheek Chauhan1-6/+5
Needed for the CI, but good to have in general too.
2017-07-16Removed consecutive identical variable assignments.Jussi Pakkanen1-1/+0
2017-06-29add project/global args and include_dirs (useful for module maps) to swift ↔Goncalo Carvalho1-0/+19
targets
2017-06-27Merged Genie support.Jussi Pakkanen2-5/+5
2017-06-27Merge pull request #1986 from phako/masterJussi Pakkanen1-0/+3
Skip handling non-available dependencies
2017-06-26Add 'Compiler.get_display_language'Guillaume Poirier-Morency1-1/+1
Use this when we print language-related information to the console and via the Ninja backend.
2017-06-26Recognise .gs extension as a Vala sourceAlistair Thomas2-5/+5
2017-06-22Split linkers out from compilers.pyAlistair Thomas1-8/+8
2017-06-22Merge pull request #1922 from acfoltzer/rust-improvementsJussi Pakkanen1-1/+35
Enhance Rust support
2017-06-22vala: Only add --use-header for unity buildsNirbheek Chauhan1-1/+7
Closes https://github.com/mesonbuild/meson/issues/1969
2017-06-22Skip handling non-available dependenciesJens Georg1-0/+3
This way, an optional dependency can always be added on Vala targets without meson adding --pkg
2017-06-19fix indentation per @ignatenkobrainAdam C. Foltzer1-1/+1
2017-06-19Expand magic markers on custom and run targets too. Closes #1681.Jussi Pakkanen1-6/+14
2017-06-14fix failing Rust test casesAdam C. Foltzer1-0/+13
2017-06-14rename `crate_type` to `rust_crate_type` per @TingPingAdam C. Foltzer1-2/+2
2017-06-12Preserve -L -l pairings fetched from external depsNirbheek Chauhan2-4/+8
While adding link args for external deps, sometimes different libraries come from different prefixes, and an older version of the same library might be present in other prefixes and we don't want to accidentally pick that up. For example: /usr/local/lib/libglib-2.0.so /usr/local/lib/pkgconfig/glib-2.0.pc /usr/local/lib/libz.so /usr/local/lib/pkgconfig/zlib.pc /home/mesonuser/.local/lib/libglib-2.0.so /home/mesonuser/.local/lib/pkgconfig/glib-2.0.pc PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig/:/usr/local/lib/pkgconfig/" If a target uses `dependencies : [glib_dep, zlib_dep]`, it will end up using /usr/local/lib/libglib-2.0.so instead of /home/mesonuser/.local/lib/libglib-2.0.so despite using the pkg-config file in /home/mesonuser/.local/lib/pkgconfig because we reorder the -L flag and separate it from the -l flag. With this change, external link arguments will be added to the compiler list without de-dup or reordering. Closes https://github.com/mesonbuild/meson/issues/1718
2017-06-11Merge pull request #1927 from centricular/gir-rpath-linkJussi Pakkanen2-9/+9
Work around GNU ld bug with -rpath,$ORIGIN
2017-06-11gnome: Work around GNU ld bug with -rpath,$ORIGINNirbheek Chauhan2-9/+9
g-ir-scanner doesn't understand -rpath, so we use -L instead which has the same effect. Closes https://github.com/mesonbuild/meson/issues/1911
2017-06-09Enhance Rust supportAdam C. Foltzer1-1/+22
- Adds a `crate_type` kwarg to library targets, allowing the different types of Rust [linkage][1]. - Shared libraries use the `dylib` crate type by default, but can also be `cdylib` - Static libraries use the `rlib` crate type by default, but can also be `staticlib` - If any Rust target has shared library dependencies, add the appropriate linker arguments, including rpath for the sysroot of the Rust compiler [1]: https://doc.rust-lang.org/reference/linkage.html
2017-06-09vs: Sometimes WindowsSDKVersion is unsetNirbheek Chauhan1-1/+3
https://ci.appveyor.com/project/jpakkane/meson/build/2871/job/ti4qpoptd5tk19sn
2017-06-09vs: Always check VSINSTALLDIR in case VisualStudioVersion is unsetNirbheek Chauhan1-17/+15
This happened on the CI, so it could happen on people's machines too: https://ci.appveyor.com/project/jpakkane/meson/build/2870/job/p2n70hg01vp3dkgl https://ci.appveyor.com/project/jpakkane/meson/build/2870/job/7ifh64mi1999guxt
2017-06-09dependencies: Add a new class ExternalDependencyNirbheek Chauhan1-1/+1
This class now consolidates a lot of the logic that each external dependency was duplicating in its class definition. All external dependencies now set: * self.version * self.compile_args and self.link_args * self.is_found (if found) * self.sources * etc And the abstract ExternalDependency class defines the methods that will fetch those properties. Some classes still override that for various reasons, but those should also be migrated to properties as far as possible. Next step is to consolidate and standardize the way in which we call 'configuration binaries' such as sdl2-config, llvm-config, pkg-config, etc. Currently each class has to duplicate code involved with that even though the format is very similar. Currently only pkg-config supports multiple version requirements, and some classes don't even properly check the version requirement. That will also become easier now.
2017-06-08fix WarningLevel in vcxproj #1913Bug1-3/+3
- VS 2010-2015 expect <WarningLevel> to be inside <ClCompile> - WarningLevel now correctly reflects VisualStudioCCompiler.get_warn_args
2017-06-04Merge pull request #1545 from centricular/dont-link-recursivelyJussi Pakkanen2-37/+33
Don't add dependencies recursively while linking
2017-06-03Use relative rpath so builds are reproducible.Jussi Pakkanen1-0/+9
2017-06-02ninja: Use shlex.quote for quoting on non-WindowsNirbheek Chauhan1-23/+23
This is more reliable, and more accurate. For instance, this means arguments in commands aren't surrounded by `'` on Linux unless that is actually needed by that specific argument. There is no equivalent helper for Windows, so we keep the old behaviour for that.
2017-06-02ninja: Use a set for target deps and ordered depsNirbheek Chauhan1-6/+6
This significantly reduces the size of build.ninja for GStreamer.
2017-06-02Don't add dependencies recursively while linkingNirbheek Chauhan1-8/+4
We were doing this on the basis of an old comment, but there was no test for it and I couldn't reproduce the issue with clang on Linux at all. Let's add a (somewhat comprehensive) test and see if it breaks anywhere if we stop doing this. Halves the size of gstreamer's build.ninja from 20M to 8.7M Closes https://github.com/mesonbuild/meson/issues/1057
2017-05-29Whitespace tweaks to reduce Flake8 warningsAlistair Thomas4-7/+5
2017-05-26Fix case sensitivity in Fortran module namesBĂĄlint Aradi1-3/+3
2017-05-24mesontest: use unbuffered IORob Doolittle1-2/+2
This helps when running mesontest as part of CI.
2017-05-23xcode-backend framework fixesblackbox1-28/+28
- frameworks-per-target ( each needs its own uid )
2017-05-23codestyleblackbox1-13/+10
2017-05-23remove debug-markerblackbox1-1/+1
2017-05-23XCode frameworks supportblackbox1-2/+82
- supported as "Link with Libraries". - Frameworks added as a group to the project - no need to specify custom linker flags anymore, xcodeproj works just like ninja example mason.build file : dep_main += [dependency('appleframeworks', modules : ['Foundation', 'AppKit', 'IOKIT', 'QuartzCore', 'OpenGL', 'GLUT', 'OpenAL'], required : true)]
2017-05-21Fix cross environment pollution.Ole André Vadla RavnÄs3-14/+18
Environment variables like CFLAGS and LDFLAGS should not affect the cross environment. Fixes #1772
2017-05-17Remove unused variables.Elliott Sales de Andrade1-8/+9
2017-05-17Use more direct dictionary literals.Elliott Sales de Andrade1-3/+1
2017-05-17Remove unused imports.Elliott Sales de Andrade2-2/+1
2017-05-14Merge pull request #1775 from mesonbuild/covupdateJussi Pakkanen1-0/+12
Better coverage report