aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
AgeCommit message (Collapse)AuthorFilesLines
2019-09-26Q&D experiment to scan and build C++ modules with VS.vsmodtestJussi Pakkanen1-1/+11
2019-09-24CUDA support on WindowsAleksey Gurtovoy2-29/+5
2019-09-14uniform scan-build detection processGabriel Ganne1-2/+1
Detect scan-build the same way when trying to launch it and when generating the target. The detection method is: 1. look within SCANBUILD env variable 2. shutil.which('scan-build') 3. *on non-linux platforms only*: go through all the possible name candidates and test them individually. The third step is added following this comment https://github.com/mesonbuild/meson/pull/5857#issuecomment-528305788 However, going through a list of all the possible candidates is neither easily maintainable nor performant, and is therefore skipped on platforms that should not require such a step (currently, only Linux platforms). This is a follow-up to the issue raised by @lantw44 during PR: https://github.com/mesonbuild/meson/pull/5857
2019-09-08Fix static archives stripping (#5905)David Seifert1-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
2019-09-05Merge pull request #5823 from scivision/linker-pgi-linuxJussi Pakkanen1-1/+5
PGI compiler fixes
2019-09-05mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy1-3/+5
2019-09-05PGI: windows workaround not-msvc-like enough functionMichael Hirsch, Ph.D1-1/+5
2019-09-01flatten list to subprocess.Popen, necessary for Python 3.8Michael Hirsch, Ph.D1-2/+2
2019-08-28ninjabackend: do not generate scan-build target if it cannnot be runGabriel Ganne1-0/+3
as what was done with clang-format, test the presence of the tool before generating a dedicated target. Pass silently if scan-build is not found. Signed-off-by: Gabriel Ganne <gabriel.ganne@mindmaze.ch>
2019-08-24Add test priorities to force test start orderPeter Hutterer1-3/+5
2019-08-24Vs backend compiler selection (#5448)Dylan Baker4-4/+42
* 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
2019-08-20Merge pull request #5681 from dcbaker/dynamic-linker-splitJussi Pakkanen1-5/+8
split dynamic linker representations from compilers
2019-08-17Pass optimization flags to rustc properly. Closes: #5788.Jussi Pakkanen1-0/+1
2019-08-17Make .extract_objects() work correctly as an input to custom_targetRachel Mant1-0/+2
2019-08-14compilers: Dispatch to dynamic linker classDylan Baker1-5/+8
Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
2019-08-10ninjabackend: Squish Coco supportAleksey Gurtovoy1-7/+17
2019-08-03Merge pull request #5644 from bonzini/meson-exe-cmdlineJussi Pakkanen3-104/+90
Show command line in `ninja -v` for `capture: true` custom targets and generators
2019-07-23Made dist a top level command.Jussi Pakkanen1-5/+1
2019-07-23linkers: Add get_base_link_args method to static linkersDylan Baker1-1/+3
MSVC needs an argument to static linkers for doing LTO, so we need a way for the static linker to tell us that.
2019-07-20Add optional progress bar when generating build.ninjaNirbheek Chauhan1-3/+3
2019-07-19backends: do not split command and arguments in ExecutableSerialisationPaolo Bonzini1-3/+2
This is not needed anymore, just make a single field with the whole command line.
2019-07-19backends: remove unnecessary fields from ExecutableSerialisationPaolo Bonzini1-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.
2019-07-19backends: discover java/mono wrapper at generation timePaolo Bonzini1-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>
2019-07-19backends: create ExecutableSerialisation in meson_exe if possiblePaolo Bonzini1-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.
2019-07-19backends: always serialize custom targets if they need a wrapperPaolo Bonzini1-20/+21
2019-07-19backends: choose whether to serialize in as_meson_exe_cmdlinePaolo Bonzini3-56/+40
This removes more duplicate code between custom targets and generators. In addition, generators can now have arguments with newlines in them.
2019-07-19vs2010backend: always serialize executables for generatorsPaolo Bonzini1-12/+14
Do the same as for custom targets.
2019-07-19backends: hide meson --internal exe cmdline from backendsPaolo Bonzini3-19/+15
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.
2019-07-10vs backend: commandrunner.py takes source dir firstXavier Claessens1-1/+1
2019-07-10Add alias_target() functionXavier Claessens2-12/+25
2019-06-30xcodebackend: Fix iterating compilers after host/build changesDylan Baker1-1/+1
Fixes #5570
2019-06-28Remove build host mixing warning on nativeJohn Ericson1-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
2019-06-27Fix two errors when cross-compiling with ValaJames Westman1-2/+1
- AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs' Fixed by adding a `get_program_dirs()` function to the base Compiler class, to match `get_library_dirs()` - KeyError: 'vala_COMPILER' Fixed by creating the Vala compile rules for all machines, not just the build machine.
2019-06-27meson_exe: Don't assert that we need an exe_wrapper when we say we don't ↵Dylan Baker1-2/+4
need one Fixes cross compiling mesa from x86_64 -> x86 on an x86_64 system. Fixes #5567
2019-06-24Merge pull request #5524 from scivision/icl_ifortDylan Baker1-3/+3
Add ifort on Windows
2019-06-24meson: add cache for getting optionsMarcel Hollerbach1-0/+1
calling this function too ~60 sec. before, now 0.000435 sec.
2019-06-24correct missing argument for IntelClFortranCompilerMichael Hirsch, Ph.D1-3/+3
ifort passes all tests cleanup logic
2019-06-23BUGFIX: Fortran module regex handle more edge casesMichael Hirsch, Ph.D1-4/+4
2019-06-21Do not quote targetdep, Ninja fails if it contains double quotes.Jussi Pakkanen1-1/+1
2019-06-20fortran depscan: ignore module procedureMichael Hirsch, Ph.D1-2/+2
2019-06-20BUGFIX syntaxMichael Hirsch, Ph.D1-7/+10
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson4-214/+185
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.
2019-06-09Use `env.machines.*` to avoid some `is_cross`John Ericson2-4/+4
This is a small example of the `is_cross` removal the that abstraction enables.
2019-06-08Moved RuntimeLibrary property to ItemDefinitionGroup/ClCompilefilippocrocchini1-9/+10
2019-06-03ninjabackend: refactor _generate_single_compileMarcel Hollerbach1-19/+24
when we are generating the include directories for a build target, then we are iterating over all include directories, check if they are . or .. and if not, generate a compile args object for it. However, the join calls and the generation of the compile object is quite expensive, if we cache the results of this, then we can _generate_single_compile from 60% to roughly 50%.
2019-06-03backend: refactor get_custom_target_provided_librariesMarcel Hollerbach1-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%.
2019-05-20Generators can have extra target dependencies. Closes #4131.Jussi Pakkanen1-0/+1
2019-05-20Switch from build.compiler to environment.coredata.compiler in backendsJon Turney1-10/+10
Switch from build.compiler to environment.coredata.compiler and likewise from build.cross_compiler to environment.coredata.cross_compiler in backends. (Only seems to be actually used in ninja backend).
2019-05-20Remove a pointless conditionalJon Turney1-5/+2
After #4445, the code in both branches of this conditional is the same.
2019-05-16Merge pull request #5395 from dcbaker/mtest-annotationsJussi Pakkanen1-2/+7
Mtest annotations and bug fixes