aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
AgeCommit message (Collapse)AuthorFilesLines
2021-03-14ninjabackend: Use rsp_file_syntax methodDylan Baker1-21/+12
This also makes us of the new enum value in the backend, for better type saftey.
2021-03-09change RSP quote style decision logicRemi Thebault1-3/+12
Take into account LDC on Windows Fixes #8494
2021-03-06Fix Fortran dep scanner for upper case file extensions. Closes #8395.Jussi Pakkanen1-1/+1
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-38/+38
performed by running "pyupgrade --py36-plus" and committing the results
2021-02-26rust: a meson -l argument could be etiher a static or dynamic libraryDylan Baker1-2/+2
I made an incorrect assumption that -l arguments would always be static libraries, but they might well be shared libraries.
2021-02-23rust: replace for loop with any()Dylan Baker1-4/+1
This is a little cleaner, and short circuits correctly, unlike the loop it replaces
2021-02-23rust: fix linking with external dependenciesDylan Baker1-0/+17
Rust can link with any dependency that uses c linkage, which is pretty much what we assume across the board anyway.
2021-02-19Fix combining C and Fortran. Closes #8377.Jussi Pakkanen1-2/+5
2021-02-16Fix VS C++ module support.Jussi Pakkanen1-1/+2
2021-02-09backends: Always use the command returned by as_meson_exe_cmdline()Xavier Claessens1-11/+8
Even if the command is not wrapped by meson, it could have been modified to add java/mono interpreters. This fix potential inconsistency between wrapped and unwrapped commands.
2021-02-08Fix exe wrapper detection for run targets.Jussi Pakkanen1-1/+1
2021-02-07Merge pull request #8162 from dcbaker/wip/2021-01/rust-module-bindgenJussi Pakkanen1-7/+12
Add a wrapper to the rust module for bindgen
2021-02-07Merge pull request #8305 from xclaesse/run-target-envJussi Pakkanen1-59/+20
run_target: Add env kwarg
2021-02-06backends/ninja: Implement linking a C ABI target into a rust targetDylan Baker1-7/+12
2021-02-05vala: Disable unity buildsDylan Baker1-13/+12
Our approach to unity builds with vala is broken, you cannot unify the generated C files, as they contain duplicate symbols. We would need to instead combine the files while they are still in their vala form, then convert that to C and compile the unified C file. This does not fix the linked issue, as this removed the ability to do vala unity builds, but it does allow running vala with `--unity=on`. Related: #5280
2021-02-05ninjabackend: add a few annotationsDylan Baker1-5/+7
2021-02-05ninjabackend: Remove useless call to replace_paths()Xavier Claessens1-1/+0
Replacements are already done by eval_custom_target_command() and must be done BEFORE calling as_meson_exe_cmdline() anyway. replace_paths() is still used by generators. Make eval_custom_target_command() more readable by handling error in the final else case instead of in the middle of elif.
2021-02-05backend: Do not check for exe wrapper twiceXavier Claessens1-1/+1
It is already checked by as_meson_exe_cmdline().
2021-02-05run_target: Add env kwargXavier Claessens1-57/+19
Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable.
2021-02-04xcode-backend: add implicit includesJeff Moguillansky1-11/+0
Move helper functions get_source_dir_include_args and get_build_dir_include_args to backend base class
2021-01-27custom_target: Add env kwargXavier Claessens1-1/+2
2021-01-25Merge pull request #8236 from ↵Jussi Pakkanen1-1/+1
dcbaker/submit/rust-fix-generated-sources-in-subdir Submit/rust fix generated sources in subdir
2021-01-23Merge pull request #8226 from jonaslb/fortranstaticJussi Pakkanen1-10/+8
Fixes for fortran: Include dirs for link_whole_targets and capital file suffix
2021-01-23split mesonlib into a packageDylan Baker1-2/+2
Currently mesonlib does some import tricks to figure out whether it needs to use windows or posix specific functions. This is a little hacky, but works fine. However, the way the typing stubs are implemented for the msvcrt and fnctl modules will cause mypy to fail on the other platform, since the functions are not implemented. To aleviate this (and for slightly cleaner design), I've split mesonlib into a pacakge with three modules. A universal module contains all of the platform agnositc code, a win32 module contains window specific code, a posix module contains the posix specific code, and a platform module contains no-op implementations. Then the package's __init__ file imports all of the universal functions and all of the functions from the approriate platform module, or the no-op versions as fallbacks. This makes mypy happy, and avoids `if`ing all over the code to switch between the platform specific code.
2021-01-21ninjabackend: Correctly reference custom_target outputs in subdirs with rustDylan Baker1-1/+1
This was missed in the last iteration of fixing things.
2021-01-21Unity build reverts to normal for fortran fixJonas Lundholm Bertelsen1-7/+2
The `determine_ext_objs` function did not take into account that fortran (and d) does not support unity builds. This caused failures in some cases.
2021-01-20ninjabackend: Correct RPATH orderFini Jastrow1-19/+20
[why] If we build and test a library we need to make sure that we find the currently build library object first, before an older system installed one. This can be broken if the library in question is installed in a custom path, and another library we depend on also is installed there. [how] Just move the rpath to the current build artifacts to the front. Solves #8030. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-20When iterating link_targets, include link_whole_targets too (fortran)Jonas Lundholm Bertelsen1-1/+4
This fixes fortran includes and fortran orderdeps for libraries that were under link_whole_targets.
2021-01-20Use case-insensitive suffix check for fortranJonas Lundholm Bertelsen1-2/+2
In Fortran it is common to use capital F in the suffix (eg. '.F90') if the source file makes use of preprocessor statements. Such files should probably be treated like all other fortran files by meson. Case insensitivity for suffixes was already implemented several places in meson before this. So most likely, the few places changed here were oversights anyway.
2021-01-19backend/ninja: Add order dependencies for generated sources in rustDylan Baker1-2/+5
2021-01-19rust: Accept generated sources for main.rsDylan Baker1-1/+12
There are still caveats here. Rust/cargo handles generated sources by writing out all targets of a single repo into a single output directory, setting a path to that via a build-time environment variable, and then include those files via a set of functions and macros. Meson's build layout is naturally different, and ninja makes working with environment variables at compile time difficult. Fixes #8157
2021-01-19Replace NinjaBackend is_rust_target with build.uses_rustDylan Baker1-8/+1
we have two functions to do the exact same thing, and they're basically implemented the same way. Instead, let's just use the BuildTarget one, as it's more generally available.
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-16/+16
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-19/+20
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+1
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker1-5/+8
2021-01-04use OptionKey for backend_optionsDylan Baker1-3/+4
2021-01-04use OptionKey for coredata.user_optionsDylan Baker1-1/+1
2020-12-29Only do module scanning if C++ version is latest.Jussi Pakkanen1-0/+2
2020-12-28Fix network path output in ninja backend on WindowsSamuel Longchamps1-0/+7
2020-12-25Extend the C++ module scanner to handle Fortran, too.Jussi Pakkanen1-35/+48
2020-12-14Propagate Windows target checks upLaurin-Luis Lehning1-4/+6
2020-12-14Give get_gui_app_args access to the EnvironmentLaurin-Luis Lehning1-1/+2
2020-12-14Give get_win_subsystem_args access to envLaurin-Luis Lehning1-1/+1
2020-12-13Add mypy annotations.Jussi Pakkanen1-1/+1
2020-12-13Scan all C++ sources and ignore everything else.Jussi Pakkanen1-5/+33
2020-12-13C++ module compilation works for a simple project.Jussi Pakkanen1-5/+21
2020-12-12Generate dependency scanning hooks in the Ninja file.Jussi Pakkanen1-9/+45
2020-12-11Generate scanning rules for C++ modules.Jussi Pakkanen1-0/+24
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen1-1/+20