summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
Commit message (Collapse)AuthorAgeFilesLines
* CUDA support on WindowsAleksey Gurtovoy2019-09-241-24/+2
|
* Fix static archives stripping (#5905)David Seifert2019-09-081-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | * Do not strip static archives Stripping static archives without more fine-grained options (e.g. `-g`) leads to failures such as ld: libfoo.a: error adding symbols: archive has no index; run ranlib to add one because GNU strip removes *every* symbol in a static archive by default. Given that static archives are not final build artifacts (unlike executables and shared libraries), stripping them gains little and only causes more edge case failures. * Gentoo's portage only strips debug information: https://github.com/gentoo/portage/blob/86f211e3a552753eb945670a39c1a3b14c3c3bd1/bin/estrip#L322 * Fedora also only strips debug information: https://github.com/rpm-software-management/rpm/blob/e9c13c6565cf4782d1f73255ee9144dd9bd2aca7/scripts/brp-strip-static-archive#L18 * Debian also only does some very light stripping: https://github.com/Debian/debhelper/blob/72ed1d3261730d56da6afde0ec7f52f32976e04d/dh_strip#L374 Fixes #4138 * Add test case for static archive stripping
* Add test priorities to force test start orderPeter Hutterer2019-08-241-3/+5
|
* Vs backend compiler selection (#5448)Dylan Baker2019-08-241-0/+1
| | | | | | | | | | | | | | | | | | * backends/vs: Only set platform_toolset if it isn't already set * interpreter: set backend up after the compiler Otherwise we won't be able to check which VS toolchain to use. * docs/using-visual-studio: wrap lines * docs: recommend the py launcher instead of python3 for windows * set backend.environment when building a dummy version * backends/vs: Add support for clang-cl with vs2017 and vs2019 backends * backends/vs: Add support for ICL (19.x) with vs2015 and vs2017 backends
* Make .extract_objects() work correctly as an input to custom_targetRachel Mant2019-08-171-0/+2
|
* backends: do not split command and arguments in ExecutableSerialisationPaolo Bonzini2019-07-191-3/+2
| | | | | This is not needed anymore, just make a single field with the whole command line.
* backends: remove unnecessary fields from ExecutableSerialisationPaolo Bonzini2019-07-191-9/+5
| | | | | | | | | | | "exe.is_cross and exe.needs_exe_wrapper" is the same condition under which meson chooses whether to include the exe_wrapper. meson_exe has an assertion for that, but now that meson_exe does not need anymore exe.is_cross, we can simplify the code if we just "trust" meson to do the right thing. Remove both fields from ExecutableSerialisation and just test the presence of the wrapper, and also remove the executable basename which is only used to "beautify" an assertion failure.
* backends: discover java/mono wrapper at generation timePaolo Bonzini2019-07-191-0/+4
| | | | | | | Move the magic to execute jar and .exe files from "meson --internal exe" to the backend, so that "ninja -v" shows more clearly what is happening. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* backends: create ExecutableSerialisation in meson_exe if possiblePaolo Bonzini2019-07-191-6/+10
| | | | | | If meson_exe is only being used to capture the output of the command, we can skip going through a pickled ExecutableSerialization object. This makes "ninja -v" output more useful.
* backends: always serialize custom targets if they need a wrapperPaolo Bonzini2019-07-191-20/+21
|
* backends: choose whether to serialize in as_meson_exe_cmdlinePaolo Bonzini2019-07-191-11/+18
| | | | | This removes more duplicate code between custom targets and generators. In addition, generators can now have arguments with newlines in them.
* backends: hide meson --internal exe cmdline from backendsPaolo Bonzini2019-07-191-2/+2
| | | | | | Return the command line from serialize_executable, which is then renamed to as_meson_exe_cmdline. This avoids repeating code that is common to custom targets and generators.
* Remove build host mixing warning on nativeJohn Ericson2019-06-281-5/+0
| | | | | | | | | | | | There are two problems with this: - It has false positives when the code that trips it is conditional and no run on cross. - It confuses users who never wrote any `native` flags and don't care about cross. Fixes #5509
* meson_exe: Don't assert that we need an exe_wrapper when we say we don't ↵Dylan Baker2019-06-271-2/+4
| | | | | | | | need one Fixes cross compiling mesa from x86_64 -> x86 on an x86_64 system. Fixes #5567
* meson: add cache for getting optionsMarcel Hollerbach2019-06-241-0/+1
| | | | calling this function too ~60 sec. before, now 0.000435 sec.
* Purge `is_cross` and friends without changing user interfacesJohn Ericson2019-06-091-47/+41
| | | | | | | | | | | | In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
* Use `env.machines.*` to avoid some `is_cross`John Ericson2019-06-091-2/+2
| | | | | This is a small example of the `is_cross` removal the that abstraction enables.
* backend: refactor get_custom_target_provided_librariesMarcel Hollerbach2019-06-031-3/+11
| | | | | | | | | the problem here is, that get_custom_target_provided_libraries iterated over all generated sources of a target. In each output we check if this is a library or not. In projects like EFL we have added a lot of generated target to many different targets, so the iterating of the output is rather consistent, with this commit we drop from 19% of the time spending in get_custom_target_provided_libraries down to 3.51%.
* Merge pull request #5395 from dcbaker/mtest-annotationsJussi Pakkanen2019-05-161-2/+7
|\ | | | | Mtest annotations and bug fixes
| * backends: Annotate TestSerialisiationDylan Baker2019-05-141-2/+7
| | | | | | | | | | | | Also, we should at some point decide whether we're going to use American spelling (serialize/serialization) or British (serialise/serialisation) because we have both, and both is always worse than one or the other.
* | UserOption no longer has a name field.John Ericson2019-05-151-3/+2
|/ | | | | | | This avoids the duplication where the option is stored in a dict at its name, and also contains its own name. In general, the maxim in programming is things shouldn't know their own name, so removed the name field just leaving the option's position in the dictionary as its name.
* compilers: Split C-Like functionality into a mixin classesDylan Baker2019-05-031-2/+2
| | | | | | | | | | | | | | | | | Currently C++ inherits C, which can lead to diamond problems. By pulling the code out into a standalone mixin class that the C, C++, ObjC, and Objc++ compilers can inherit and override as necessary we remove one source of diamonding. I've chosen to split this out into it's own file as the CLikeCompiler class is over 1000 lines by itself. This also breaks the VisualStudio derived classes inheriting from each other, to avoid the same C -> CPP inheritance problems. This is all one giant patch because there just isn't a clean way to separate this. I've done the same for Fortran since it effectively inherits the CCompiler (I say effectively because was it actually did was gross beyond explanation), it's probably not correct, but it seems to work for now. There really is a lot of layering violation going on in the Compilers, and a really good scrubbing would do this code a lot of good.
* Merge pull request #5311 from mensinda/flake8PluginsJussi Pakkanen2019-05-021-1/+3
|\ | | | | Added flake8 plugins and some code fixes
| * Fix flake8-bugbear warningsDaniel Mensinger2019-04-291-1/+3
| |
* | Cleaned up `isinstance` usageTheQwertiest2019-04-291-1/+1
| |
* | Added custom_target[i] support for link_with and link_wholeTheQwertiest2019-04-291-1/+3
|/
* Add support for VS2019. Closes #4640.Jussi Pakkanen2019-04-101-0/+3
|
* Merge pull request #5225 from dcbaker/threads-is-not-specialJussi Pakkanen2019-04-081-2/+0
|\ | | | | Threads is not special
| * dependencies/misc: don't special case threadsDylan Baker2019-04-051-2/+0
| | | | | | | | | | | | | | Instad of having special casing of threads in the backends and everywehre else, do what we did for openmp, create a real dependency. Then make use of the fact that dependencies can now have sub dependencies to add threads.
* | backends/ninja: Add native files to rebuild dependenciesDylan Baker2019-04-041-0/+1
|/ | | | Just like cross files.
* Merge pull request #5103 from mesonbuild/linkcustomJussi Pakkanen2019-04-011-0/+10
|\ | | | | Can link against custom targets
| * Can link against custom targets. Closes #4908.Jussi Pakkanen2019-03-181-0/+4
| |
| * Add test script to generate a static library with a custom target.Jussi Pakkanen2019-03-181-0/+6
| |
* | Merge pull request #5116 from dcbaker/openmp-de-specializeJussi Pakkanen2019-03-211-2/+0
|\ \ | | | | | | dependencies/openmp: Don't special case OpenMP
| * | dependencies/openmp: Don't special case OpenMPDylan Baker2019-03-191-2/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we specialcase OpenMP like we do threads, with a special `need_openmp` method. This seems like a great idea, but doesn't work out in practice, as well as it complicates the opemp implementation. If GCC is built without opemp support for example, we still add -fopenmp to the the command line, which results in compilation errors. This patch discards that and treats it like a normal dependency, removes the need_openmp() method, and sets the compile_args attributes from the compiler. Fixes #5115
* | mesonbuild: allow multiple --cross-file optionsRoss Burton2019-03-201-2/+1
|/ | | | | Just like --native-file, allow multiple --cross-file options. This is mostly unifying the logic between cross_files and config_files.
* interpreter: add "protocol" kwarg to testPaolo Bonzini2019-03-021-2/+3
| | | | This is the first step towards adding support for TAP.
* auto generate msvc pch source file if none is provided by the userNicolas Schneider2019-03-011-0/+17
|
* Remove remaining cross-specific compiler-args codeJohn Ericson2019-02-151-4/+4
| | | | | Since the consolidation of flags in `compiler_options.*`, this cross/native special casing is not needed.
* Never access environment.properties downstreamJohn Ericson2019-02-021-5/+14
| | | | | | | | | | | | | | | | | Instead use coredata.compiler_options.<machine>. This brings the cross and native code paths closer together, since both now use that. Command line options are interpreted just as before, for backwards compatibility. This does introduce some funny conditionals. In the future, I'd like to change the interpretation of command line options so - The logic is cross-agnostic, i.e. there are no conditions affected by `is_cross_build()`. - Compiler args for both the build and host machines can always be controlled by the command line. - Compiler args for both machines can always be controlled separately.
* pep8 py37Michael Hirsch, Ph.D2019-01-291-2/+2
|
* custom_target: do not let install override build_by_defaultLuca Boccassi2019-01-171-3/+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
* Calculate target paths correctly when workdir is set.Jussi Pakkanen2019-01-071-1/+8
|
* Fixed CI issuesDaniel Mensinger2019-01-061-8/+17
|
* Make custom command sources slightly more usefulDaniel Mensinger2019-01-061-1/+7
|
* Simplefied absolute path generationDaniel Mensinger2019-01-061-0/+2
|
* Doc updates and throw if no target type is setDaniel Mensinger2019-01-061-7/+1
|
* Ninja backend target introspectionDaniel Mensinger2019-01-061-5/+9
|
* Removed fallback detection logicDaniel Mensinger2019-01-061-169/+15
|
* Some code cleanupDaniel Mensinger2019-01-061-24/+71
|