aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
AgeCommit message (Collapse)AuthorFilesLines
2018-02-25Use include_directories for D impdirs.dimpdirJussi Pakkanen1-0/+3
Change the code to store D properties as plain data. Only convert them to compiler flags in the backend. This also means we can fully parse D arguments without needing to know the compiler being used.
2018-02-25Add support for Visual Studio csc c# compilerThibault Saunier1-5/+14
2018-02-22Fix Rust compiler-private library ambiguityAdam C. Foltzer1-0/+4
When building a Rust target with Rust library dependencies, an `--extern` argument is now specified to avoid ambiguity between the dependency library, and any crates of the same name in `rustc`'s private sysroot. Includes an illustrative test case.
2018-02-22Allow for missing install_dir in install_data()Peter Hutterer1-0/+2
The documentation doesn't require it and the interpreter code works around the possibility of it being None. The ninja backend code however fails with File "/home/whot/code/meson/mesonbuild/backend/ninjabackend.py", line 796, in generate_data_install dstabs = os.path.join(subdir or None, plain_f) File "/usr/lib64/python3.6/posixpath.py", line 78, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType If install_dir is missing, default to datadir/projectname
2018-02-21Generate build rpath for pkg-config dependencies consisting of a one ↵Martin Hostettler1-1/+1
absolute path
2018-02-20vala: Fix path of C file with generated Vala filesNirbheek Chauhan1-5/+21
We missed one particular edge-case in #2413: when the generated vala file is inside --basedir, the path is not just the basename.c Since this case can never happen in a project test, this includes a unit test for the same. Closes https://github.com/mesonbuild/meson/issues/815
2018-02-16Merge pull request #3069 from dcbaker/pch_one_argJussi Pakkanen1-10/+4
Fix targets with C and C++ code that use pre compiled headers
2018-02-15Only remove substring if it is part of stringNiklas Claesson1-3/+6
Fixes #2661
2018-02-14backends: Only add pch args that are appropriate for the compilerDylan Baker1-10/+4
Currently we try both C and C++ when determining which PCH files to include. The problem with this approach is that if there are no C or C++ files (only headers) and the target has both C and C++ sources then the PCHs will be passed to the wrong compiler. The solution is less code, we already have the compiler, the compiler knows what language it is, so we don't need to walk both C and C++. Fixes #3068
2018-02-05Rename install_subdir() option elide_directory to strip_directoryAleksey Filippov1-1/+1
2018-02-05Add elide_directory keyword for install_subdir() functionAleksey Filippov1-2/+3
If elide_directory=true install_subdir() installs directory contents instead of directory itself, eliding name of the source directory. Closes #2869.
2018-02-04Merge pull request #2938 from acfoltzer/rust-cross-mergeJussi Pakkanen1-5/+11
Add cross-compilation support for `rustc`
2018-02-04Refactor and simplify install_subdir()Aleksey Filippov1-11/+8
- Pass exclude_files and exclude_directories relative to src_dir, same as specified by user and documented in public install_subdir(). - Make do_copydir() interface similar to do_copyfile(): install src_dir contents to dst_dir. - Remove src_prefix/src_dir code, it adds confusion and duplicates arguments. Use single src_dir parameter instead. - Make callers specify that src_dir contents should be installed under dst_dir/basename(src_dir) if necessary. - Use os.path.relpath() instead of string manipulations on paths. - Add documentation to do_copydir(): specify types and add usage example.
2018-02-02Only quote colons on build lines. Closes #2961.Jussi Pakkanen1-6/+10
2018-01-29Add cross-compilation support for `rustc`Adam C. Foltzer1-5/+11
This patch is largely modeled on the relatively-straightforward code for Fortran cross-compilation, so there might be some intricacies missing.
2018-01-30Use os.path: basename() and dirname() instead of split()Aleksey Filippov4-11/+11
According to Python documentation[1] dirname and basename are defined as follows: os.path.dirname() = os.path.split()[0] os.path.basename() = os.path.split()[1] For the purpose of better readability split() is replaced by appropriate function if only one part of returned tuple is used. [1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-13Merge pull request #2764 from mesonbuild/generatorpathJussi Pakkanen2-5/+11
Generator outputs can have path segments
2018-01-09Add `export_dynamic` argument to `executable`. (#2662)Nikita Churaev1-0/+3
2018-01-08Merge pull request #2885 from BeChris/fix_vs_pchJussi Pakkanen2-15/+23
Fix MSVC backend crashes when `c_pch` or `cpp_pch` is not an array
2018-01-07Modify exception raised when msvc pch is badly specifiedChristophe Gouiran2-2/+2
2018-01-07Print problem text in error message. Closes #2882.Jussi Pakkanen1-2/+6
2018-01-06Fix MSVC backend crashes when `c_pch` or `cpp_pch` is not an arrayChristophe Gouiran1-14/+22
2017-12-30Fail Visual Studio version detection if VSINSTALLDIR is not setGabríel Arthúr Pétursson1-4/+3
The Visual Studio Developer Command Prompt always sets the VSINSTALLDIR environment variable. If not, we probably have a broken environment and won't get very far anyway.
2017-12-21Fix Windows.Jussi Pakkanen2-2/+4
2017-12-18Can declare file generation in one dir and use the output in another.Jussi Pakkanen2-4/+8
2017-12-16Do not extract object for header sourcesXavier Claessens1-2/+8
Closes #2716
2017-12-10Merge pull request #2745 from dcbaker/submit/haikuJussi Pakkanen2-2/+2
small fixes for haiku
2017-12-10Merge pull request #2697 from mesonbuild/custom-target-depends-serializeJussi Pakkanen3-17/+34
custom target: Consider all build depends while serializing
2017-12-07haiku: do not add pthread argumentsDylan Baker2-2/+2
Haiku has pthreads, but they are part of the standard C library, and do not need either special compiler or linker flags.
2017-12-03Fix path for str arguments to depend_filesJoergen Ibsen1-2/+2
Fixes #2633
2017-12-03Merge pull request #2618 from mesonbuild/osxlinkerfixesJussi Pakkanen1-0/+2
Fix many things have have been slightly broken in OSX
2017-12-02custom target: Consider all build depends while serializingNirbheek Chauhan3-17/+34
Currently, we only consider the build depends of the Executable being run when serializing custom targets. However, this is not always sufficient, for example if the executable loads modules at runtime or if the executable is actually a python script that loads a built module. For these cases, we need to set PATH on Windows correctly or the custom target will fail to run at build time complaining about missing DLLs.
2017-11-30VS: Add /DEBUG to linker to generate debug informationNiklas Claesson2-3/+12
2017-11-26spelling: verifierJosh Soref1-1/+1
2017-11-26Use absolute paths for rpaths on OSX.Jussi Pakkanen1-0/+2
2017-11-26spelling: overwriteJosh Soref1-1/+1
2017-11-26spelling: overriddenJosh Soref2-4/+4
2017-11-26spelling: dependencyJosh Soref1-1/+1
2017-11-21Review fixes.Jussi Pakkanen2-3/+3
2017-11-20Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen3-7/+8
2017-10-31namespace run_targets by subprojectMartin Kelly1-4/+9
Currently, run_target does not get namespaced for each subproject, unlike executable and others. This means that two subprojects sharing the same run_target name cause meson to crash. Fix this by moving the subproject namespacing logic from the BuildTarget class to the Target class.
2017-10-03Use long form of valac options and make --basedir use relative pathAlistair Thomas1-4/+4
2017-10-03Merge github.com:mesonbuild/meson into vala-target-dirsCorentin Noël1-0/+24
2017-10-03Reduce code complexity, fix nested array in files instructionCorentin Noël1-4/+3
2017-10-02Merge pull request #2397 from mesonbuild/prebuiltJussi Pakkanen1-0/+24
Better support for prebuilt shared libs
2017-10-02Allow different directories for Vala filesCorentin Noël1-2/+8
2017-10-02Add rpath entries for all found libraries outside of system libraries.Jussi Pakkanen1-3/+8
2017-10-01backends: avoid extraneous trailing os.path.sep when joining pathsLiam Staskawicz1-2/+5
resolves #2336
2017-10-01Merge pull request #2313 from dcbaker/fix-2180Jussi Pakkanen2-11/+36
link_whole should be considered a source for targets
2017-10-01Fix MSVC builds.Jussi Pakkanen1-1/+3