summaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
Commit message (Collapse)AuthorAgeFilesLines
...
* do not duplicate external dependencies in listBruce Richardson2019-03-131-2/+3
| | | | | | | | | | | Since the "-l<lib>" flags in the build.ninja file are passed in "--start-group"/"--end-group" flags, there should be no need to have any library listed twice, even if there are circular dependencies. Therefore we can eliminate duplicates. For speed, rather than deduplicating at the end of the process, it's faster to not add the duplicate flags in the first place. This should help fix #2150
* build: Handle EOFError and AttributeError like coredataDylan Baker2019-03-121-1/+6
| | | | Fixes #5056
* auto generate msvc pch source file if none is provided by the userNicolas Schneider2019-03-011-0/+2
|
* Allow custom targets with same name in project and subprojectsRaphael Salamon2019-02-191-3/+0
| | | | closes #4377
* Allow File arguments in extract_objects() argumentsMaarten ter Huurne2019-02-191-3/+6
| | | | | Passed strings are converted to Files, but passing a File directly wasn't supported yet.
* Add cuda_args keyword.Olexa Bilaniuk2019-01-311-3/+4
|
* raise an error if PCH files are stored in different foldersNicolas Schneider2019-01-291-0/+3
|
* custom_target: do not let install override build_by_defaultLuca Boccassi2019-01-171-0/+5
| | | | | | | | | | A custom_target, if install is set to true, will always be built by default even if build_by_default is explicitly set to false. Ensure that this does not happen if it's set explicitly. To keep backward compatibility, if build_by_default is not set explicitly and install is true, set build_by_default to true. Fixes #4107
* Build class should not duplicate compiler stateJohn Ericson2019-01-141-11/+10
| | | | | Compilers should be held by coredata, so this is just here for convenience.
* Some small fixesDaniel Mensinger2019-01-061-1/+6
|
* Doc updates and throw if no target type is setDaniel Mensinger2019-01-061-7/+8
|
* Filenames are now listsDaniel Mensinger2019-01-061-0/+3
|
* Added unit testDaniel Mensinger2019-01-061-1/+1
|
* Some code cleanupDaniel Mensinger2019-01-061-0/+12
|
* fail configuration if PCH files do not existNicolas Schneider2019-01-011-0/+3
| | | | | | Previously, the configuration worked fine, but the compiler raised an error. Now, we explicitly check for the existence of files and print a useful error message if they do not exist.
* Do not write cp entry when it is empty. Closes #4602.Jussi Pakkanen2018-12-091-1/+4
|
* BuildTarget: Fix typo, self.install does not existsXavier Claessens2018-12-041-1/+1
|
* Combine `run_tests` import lines in `run_unittests`John Ericson2018-12-031-4/+6
|
* Use first 7 letters of sha256 for subdirectory part of target idAleksey Filippov2018-11-221-8/+28
| | | | | | | | | | | Fixed-size hash makes paths shorter and prevents doubling of path length because of subdir usage in target id: "subdir/id" would generate "subdir/{subdir-without-slashes}@@id" target otherwise. Export construct_id_from_path() to aid tests. Add a separate unit test for this function to make sure it is not broken unexpectedly. Closes #4226.
* Add kwarg is_default to add_test_setup()Stian Selnes2018-11-121-0/+1
| | | | | | | is_default may be used to set the name of the test setup that will be used by default whenever the option --setup is not given. Fixes #4430
* Merge pull request #4480 from jon-turney/fix-implib-prefix-suffixJussi Pakkanen2018-11-101-8/+4
|\ | | | | Fix naming of implib when name_prefix/suffix is used
| * Generate import lib even if both name_suffix and name_prefix are usedJon Turney2018-11-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a (presumably unintentional) quirk of the current implementation of SharedLibrary.determine_filenames() that if both name_suffix and name_prefix are set, an import library isn't generated. Adjust test 'common/25 library versions': Make the library have exports, so an implib is generated with MSVC. Add implib to set of files expected to be installed Adjust test 'common/122 shared module': Add libnosyms implib to set of files expected to be installed, except for MSVC, where none is generated as it has no exports
| * Fix library implib name when name_prefix: is usedJon Turney2018-11-061-3/+3
| | | | | | | | | | | | | | | | Use the specified name_prefix for implib, rather than hardcoding it. (This is needed to allow an installed library given name_prefix:'' and a name starting with 'lib' to be linked with using -l. (This case is handled specially in the pkgconfig module))
* | Add support for Renesas CC-RX toolchainPhillip Cao2018-11-081-5/+7
|/
* Detect clang-cl as msvc-like, not clang-likeJon Turney2018-11-041-1/+1
| | | | | | | | | | | | | | | | | Handle clang's cl or clang-cl being in PATH, or set in CC/CXX Future work: checking the name of the executable here seems like a bad idea. These compilers will fail to be detected if they are renamed. v2: Update compiler.get_argument_type() test Fix comparisons of id inside CCompiler, backends and elsewhere v3: ClangClCPPCompiler should be a subclass of ClangClCCompier, as well Future work: mocking in test_find_library_patterns() is effected, as we now test for a subclass, rather than self.id in CCompiler.get_library_naming()
* Rollback if an optional subproject failsXavier Claessens2018-10-291-0/+13
| | | | | | | | | | | If a subproject is not required and fails during its configuration, the parent project continues, but should not include any target or state set by the failed subproject. This fix ninja still trying to build targets generated by subprojects before they fail in their configuration. The 'build' object is now per-interpreter instead of being global. Once a subproject interpreter succeed, values from its 'build' object are merged back into its parent 'build' object.
* Add 'b_pie' compiler optionXavier Claessens2018-10-201-7/+24
| | | | | On Android executables must be position independent, many distributions enable it by default too for security reasons.
* Merge pull request #4293 from marcelhollerbach/masterJussi Pakkanen2018-10-041-1/+67
|\ | | | | Performance optimize the install part generation
| * build: generate the mappings in the TargetsMarcel Hollerbach2018-10-011-1/+34
| | | | | | | | | | | | | | | | | | Before, the mappings has been created over all the links, while it actaully only used the Shared or Static Targets. This structure now is tree like structured and cached, thus the results can be computed a lot faster. The generator step generate_install is now for EFL from 6 sec. down to 0.3s. Which improves the overall build time from ~20 sec. to ~14 sec.
| * build: move default_install_dir to the Target classesMarcel Hollerbach2018-10-011-0/+33
| | | | | | | | | | | | there is a huge amount of isinstance calls, this reduces the amount of these calls while splitting up a rather big function. It also assosiates every target type with theire default install directory.
* | Add conditional debug identifiers for D compilers, and enable for debug buildsGoaLitiuM2018-09-271-1/+5
|/ | | | Also includes parsing the highest integer level for debug and version.
* Merge pull request #4174 from jon-turney/link-with-custom-targetJussi Pakkanen2018-09-171-3/+2
|\ | | | | Improve error when trying to link_with a custom_target
| * Move default is_linkable_target method up from BuildTarget to TargetJon Turney2018-09-131-3/+2
| | | | | | | | | | BuildTarget.link() assumes that it can call is_linkable_target() on any objects which are a subclass of Target
* | Fix flake8 whitespace reportsJon Turney2018-09-131-1/+0
|/ | | | | | $ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)' ./mesonbuild/build.py:964:5: E303 too many blank lines (2) ./tools/dircondenser.py:70:36: E221 multiple spaces before operator
* mesonbuild: move subdir generation along link dep generationMarcel Hollerbach2018-09-111-1/+9
| | | | | | | | | | | | | | The problem with the earlier position of the generation code was, that the results could not be cached, because the list of all link_deps was overall different. However, it shared a special kind of subsets with other build build targets. Generating the set of subdirs that are required for linking, alongside with the link dependencies brings the possibility of caching this. This reduces the buildting from 1 min. in efl down to 20 sec. And reduces the amount of 30872534 calls down. this saves ~40 sec.
* build: try to cache the result of the link depsMarcel Hollerbach2018-09-111-0/+3
| | | | this safes in the efl meson build about 20 sec.
* Allow override_find_program to use an executable.Rafael Ávila de Espíndola2018-09-031-0/+4
| | | | | | | | | | | | | | | With this it is now possible to do foobar = executable('foobar', ...) meson.override_find_program('foobar', foobar) Which is convenient for a project like protobuf which produces both a dependency and a tool. If protobuf is updated to use override_find_program, it can be used as protobuf_dep = dependency('protobuf', version : '>=3.3.1', fallback : ['protobuf', 'protobuf_dep']) protoc_prog = find_program('protoc')
* Improve support for macOS dylib versioningNirbheek Chauhan2018-08-291-1/+48
| | | | | | | | | | | | | | We now use the soversion to set compatibility_version and current_version by default. This is the only sane thing we can do by default because of the restrictions on the values that can be used for compatibility and current version. Users can override this value with the `darwin_versions:` kwarg, which can be a single value or a two-element list of values. The first one is the compatibility version and the second is the current version. Fixes https://github.com/mesonbuild/meson/issues/3555 Fixes https://github.com/mesonbuild/meson/issues/1451
* Merge pull request #4016 from thiblahute/hotdocJussi Pakkanen2018-08-291-1/+2
|\ | | | | modules: Add an 'hotdoc' module
| * modules: Add an 'hotdoc' moduleThibault Saunier2018-08-281-1/+2
| | | | | | | | hotdoc: http://github.com/hotdoc/hotdoc/
* | Add support for custom dist scripts.Jussi Pakkanen2018-08-271-0/+1
| |
* | Merge pull request #3981 from GoaLitiuM/d-win-fixesJussi Pakkanen2018-08-271-1/+1
|\ \ | | | | | | Fix D support on Windows
| * | Fix import libraries and static library namingGoaLitiuM2018-08-201-1/+1
| |/
* | Added "native" kwarg to add_XXX_args. Closes #3669.Jussi Pakkanen2018-08-221-8/+17
|/
* Call it gnu_symbol_visibility instead.Jussi Pakkanen2018-08-091-7/+7
|
* Add kwarg for specifying symbol visibility.Jussi Pakkanen2018-08-091-0/+9
|
* custom targets: Add a 'console' kwarg for long-running commandsNirbheek Chauhan2018-07-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* gnome.gdbus_codegen: Handle XML docbook in subdirsNirbheek Chauhan2018-07-111-1/+1
| | | | Closes https://github.com/mesonbuild/meson/issues/3870
* Add new method: mlog.deprecation()Nirbheek Chauhan2018-07-071-1/+1
| | | | Instead of constructing it manually, use a helper.
* java: implement java linkingNiclas Moeslund Overby2018-07-031-1/+10
|