summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
Commit message (Collapse)AuthorAgeFilesLines
* Xcode: put all include dirs via a property rather than a cmd line arg.Jussi Pakkanen2021-04-211-2/+6
|
* Xcode: regenerato project file when build conf changes.Jussi Pakkanen2021-04-191-0/+16
|
* Xcode: fix running commands that lie in the build root dir.Jussi Pakkanen2021-04-181-1/+1
|
* Xcode: fix custom target chaining.Jussi Pakkanen2021-04-181-2/+2
|
* Xcode: fix custom targets that produce objs and libs.Jussi Pakkanen2021-04-161-0/+24
|
* Xcode: fix setting up inlude args for source and build dirs.Jussi Pakkanen2021-04-111-2/+6
|
* Xcode: Fix source generation.Jussi Pakkanen2021-04-101-1/+13
|
* Write include dirs with absolute paths in the Xcode backend, relative ones ↵Jussi Pakkanen2021-04-091-4/+7
| | | | do not seem to work.
* backends: Remove @PRIVATE_OUTDIR_(ABS)@ substitutionXavier Claessens2021-03-261-12/+0
| | | | It is not documented and does not seems to be used anywhere.
* devenv: Set GI_TYPELIB_PATH and LD_LIBRARY_PATH (#8548)Xavier Claessens2021-03-231-3/+18
|
* split program related classes and functions out of dependenciesDylan Baker2021-03-191-7/+8
| | | | | | Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
* Add `meson devenv` command and meson.add_devenv()Xavier Claessens2021-03-161-0/+19
|
* EnvironmentVariables: Simplify and annotateXavier Claessens2021-03-161-4/+4
|
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-13/+13
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* various python neatness cleanupsEli Schwartz2021-03-041-1/+1
| | | | | | | | | | | | | | | | All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
* Windows Subsystem for Linux can run .exe without mono interpreterXavier Claessens2021-03-031-1/+1
| | | | Fixes: #8445
* install_man locale supportJason Woodward2021-02-271-2/+8
| | | | | | | | | | Rather than having to manually build the locale aware man paths with `install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')` Support doing `install_man('foo.fr.1', locale: 'fr')`
* minstall: Add --skip-subprojects optionXavier Claessens2021-02-221-33/+34
| | | | | | | | | By default all subprojects are installed. If --skip-subprojects is given with no value only the main project is installed. If --skip-subprojects is given with a value, it should be a coma separated list of subprojects to skip and all others will be installed. Fixes: #2550.
* Don't access other enum members from selfMiro Hrončok2021-02-181-3/+4
| | | | | | | This is deprecated in Python 3.10. Instead, acces them from the class. Fixes https://github.com/mesonbuild/meson/issues/8318
* Substitute @CURRENT_SOURCE_DIR@ in run_target() and custom_target()Xavier Claessens2021-02-171-0/+2
| | | | | | | | | | | | | | | run_target() does some variable substitutions since 0.57.0. This is a new behavior, and undocumented, caused by sharing more code with custom_target(). More consistency is better, so document it now. custom_target() was doing variable substitution in the past, because it shared some code with generator(), but that was undocumented. Some refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@, @SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back @CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@ because it is duplicate with @SOURCE_ROOT@ that has a better name. Also do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and not @BUILD_ROOT@ surprisingly, adding to the confusion.
* backends: Fix custom_target() with configure_file() exeXavier Claessens2021-02-091-0/+3
|
* backends: Always use the command returned by as_meson_exe_cmdline()Xavier Claessens2021-02-091-4/+4
| | | | | | 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.
* Fix exe wrapper detection for run targets.Jussi Pakkanen2021-02-081-1/+11
|
* Merge pull request #8305 from xclaesse/run-target-envJussi Pakkanen2021-02-071-23/+22
|\ | | | | run_target: Add env kwarg
| * ninjabackend: Remove useless call to replace_paths()Xavier Claessens2021-02-051-4/+4
| | | | | | | | | | | | | | | | | | 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.
| * backend: Do not check for exe wrapper twiceXavier Claessens2021-02-051-15/+2
| | | | | | | | It is already checked by as_meson_exe_cmdline().
| * run_target: Add env kwargXavier Claessens2021-02-051-4/+16
| | | | | | | | | | | | 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.
* | vala: Disable unity buildsDylan Baker2021-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | xcode-backend: add implicit includesJeff Moguillansky2021-02-041-0/+11
|/ | | | | Move helper functions get_source_dir_include_args and get_build_dir_include_args to backend base class
* add_install_script: add skip_if_destdir kwargXavier Claessens2021-01-301-0/+1
| | | | | | | | It is common, at least in GNOME projects, to have scripts that must be run only in the final destination, to update system icon cache, etc. Skipping them from Meson ensures we can properly log that they have not been run instead of relying on such scripts to to it (they don't always).
* Fix executable as script on WindowsXavier Claessens2021-01-301-31/+38
| | | | | | | | | | | | | | | | | | On Windows this would fail because of missing DLL: ``` mylib = library(...) exe = executable(..., link_with: mylib) meson.add_install_script(exe) ``` The reason is on Windows we cannot rely on rpath to find libraries from build directory, they are searched in $PATH. We already have all that mechanism in place for custom_target() using ExecutableSerialisation class, so reuse it for install/dist/postconf scripts too. This has bonus side effect to also use exe_wrapper for those scripts. Fixes: #8187
* custom_target: Add env kwargXavier Claessens2021-01-271-5/+8
|
* Unity build reverts to normal for fortran fixJonas Lundholm Bertelsen2021-01-211-0/+8
| | | | | | 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.
* When iterating link_targets, include link_whole_targets too (fortran)Jonas Lundholm Bertelsen2021-01-201-1/+2
| | | | | This fixes fortran includes and fortran orderdeps for libraries that were under link_whole_targets.
* Removal of /ZI on MSVC DebugMarios Staikopoulos2021-01-171-4/+5
| | | | | | | | The /ZI flag adds in "Edit and Continue" debug information, which will cause massive slowdown. It is not a flag that we should be adding by default to debug builds. /Zi will still be added.
* backends/backends: Add type annotations for InstallDataDylan Baker2021-01-131-27/+36
| | | | | | | | This adds enough type annotations for InstallData and friends to make minstall happy. There is also a small change in that I've replaced the List[List] with List[Tuple], as tuples are more appropraite data types for the information (fixed length, position matters, different types at different indexes)
* use PEP8 style naming for LANGUAGES_USING_* as wellDylan Baker2021-01-111-2/+2
|
* mtest: Add support for rust unit testsDylan Baker2021-01-051-0/+5
| | | | | | | | | | Rust has it's own built in unit test format, which is invoked by compiling a rust executable with the `--test` flag to rustc. The tests are then run by simply invoking that binary. They output a custom test format, which this patch adds parsing support for. This means that we can report each subtest in the junit we generate correctly, which should be helpful for orchestration systems like gitlab and jenkins which can parse junit XML.
* Use a single coredata dictionary for optionsDylan Baker2021-01-041-8/+8
| | | | | | | 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).
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-14/+15
| | | | | | | | 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.
* use OptionKey for compiler_optionsDylan Baker2021-01-041-8/+7
|
* use real pathlib moduleDylan Baker2020-11-201-1/+1
| | | | | We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
* build: use PIE objects for static libraries if b_staticpic=false but b_pie=truePaolo Bonzini2020-10-181-1/+1
| | | | | | | | | | | | If static_library is used as a convenience library (e.g. for link_whole) it should in principle not need position independent code. However, if the executables that the libraries is linked to are PIE, the non-PIC objects in the static library will cause linker errors. To avoid this, obey b_pie for static libraries if either b_staticpic=false or they use "pic: false". Without this patch, QEMU cannot use b_staticpic, which causes a slowdown on some QEMU benchmarks up to 20%.
* intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger2020-10-151-1/+1
|
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-041-2/+2
|
* Merge pull request #7762 from jon-turney/meson-exe-output-improveJussi Pakkanen2020-09-291-6/+25
|\ | | | | Improve the output for meson wrapped commands
| * Make meson_exe report pickled command when it failsJon Turney2020-09-201-0/+1
| | | | | | | | | | Make 'meson --internal exe --unpickle' report the actual command executed when it fails, which is otherwise invisible.
| * Improve description of meson wrapped custom commandsJon Turney2020-09-201-6/+24
| | | | | | | | | | | | I've always found ninja reporting 'a meson_exe.py custom command' unclear and confusing. Instead say we are invoking a custom command, wrapped by meson, and why.
* | compilers/VS: fix build to use optimization and debug flagsVili Väinölä2020-09-291-0/+4
|/ | | | | | | | - Fixed using debug and optimization built-in options in MSVC. - Fixed that VS backend does not create pdb files in release mode. VS implicitly adds the debug fields if left out. - Fix that it is possible to add debug info with ninja backend with optimizations.
* backends: Treat build target as generator only when it's the first argNirbheek Chauhan2020-09-171-3/+5
| | | | | Otherwise it might be an argument to a script that just inspects the binary itself.