Commit Graph

895 Commits

Author SHA1 Message Date
Daniel Mensinger 9435f11b17
ci: Add CI command to include text files in the CI log 2019-11-19 15:21:13 +01:00
Jussi Pakkanen 35e809fc5e Store run target names in build.
This way we can easily check that we only provide builtin targets such
as clang-format if the user has not provided their own.
2019-11-10 23:45:42 +02:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Aleksey Gurtovoy 48e6db89ab Ask Ninja to expand rsp files in compile_commands.json 2019-11-02 16:16:09 +02:00
Marc-André Lureau 1ed70e22b9 Add source tags targets 2019-10-22 20:48:24 +03:00
Xavier Claessens 212a05b87e Remove duplicated object files in static libraries
When a static library link_whole to a bunch of other static libraries,
we have to extract all their objects recursively. But that could
introduce duplicated objects. ar is dumb enough to allow this without
error, but once the resulting static library is linked into an
executable or shared library, the linker will complain about duplicated
symbols.
2019-10-21 01:08:05 +03:00
Michael Hirsch, Ph.D ecaba8c234 xcode 64 bit for catalina [skip ci] 2019-10-18 01:07:52 +03:00
Jakub Adam 1bf1782476 Fix *.pdb files missing in meson introspect --installed output
On Windows, make sure the introspect command lists all Program database
(PDB) files containing debugging information that Meson will install.
2019-10-09 15:50:20 +02:00
Jussi Pakkanen d3b389f349 Add clang-tidy target. Closes #2383. 2019-10-01 22:02:51 +03:00
Jussi Pakkanen 5a52983f16 Refactor clang tool generation to its own function. 2019-10-01 22:02:51 +03:00
Ting-Wei Lan 0390b673f1 Find clang-format with alternative names
This is similar to what we currently do for scan-build except there is
no environment variable to choose a specific clang-format to run. If an
environment variable is needed for better control, we can add it later.
2019-09-29 00:11:15 +08:00
Dylan Baker f724cc2042 backends: Add needs_exe_wrapper to test serialization
We need to know if the test actually needs an exe wrapper to run or not.
2019-09-28 18:11:06 +03:00
Aleksey Gurtovoy 7dbabdc7b6 Correctly handle platform-specific LDFLAGS options 2019-09-27 00:57:21 +03:00
Aleksey Gurtovoy 6ac5db50c9 CUDA support on Windows 2019-09-24 14:22:20 -07:00
Gabriel Ganne e7197895b2 uniform scan-build detection process
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-14 05:51:36 +03:00
David Seifert e19a49b895 Fix static archives stripping (#5905)
* 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:
  86f211e3a5/bin/estrip (L322)
* Fedora also only strips debug information:
  e9c13c6565/scripts/brp-strip-static-archive (L18)
* Debian also only does some very light stripping:
  72ed1d3261/dh_strip (L374)

Fixes #4138

* Add test case for static archive stripping
2019-09-08 19:48:57 -04:00
Jussi Pakkanen d67d5411bb
Merge pull request #5823 from scivision/linker-pgi-linux
PGI compiler fixes
2019-09-05 23:45:54 +03:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Michael Hirsch, Ph.D 25653cac07
PGI: windows workaround not-msvc-like enough function 2019-09-05 11:54:09 -04:00
Michael Hirsch, Ph.D 4c8b41a173 flatten list to subprocess.Popen, necessary for Python 3.8 2019-09-01 21:45:47 +03:00
Gabriel Ganne 4143c7bceb ninjabackend: do not generate scan-build target if it cannnot be run
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-28 20:36:10 +03:00
Peter Hutterer 4ebce2c3f2 Add test priorities to force test start order 2019-08-24 21:26:41 +03:00
Dylan Baker 110b562930 Vs backend compiler selection (#5448)
* 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-24 02:32:56 +03:00
Jussi Pakkanen 1ea3ddc6ad
Merge pull request #5681 from dcbaker/dynamic-linker-split
split dynamic linker representations from compilers
2019-08-20 23:14:05 +03:00
Jussi Pakkanen 80ef6fd69f Pass optimization flags to rustc properly. Closes: #5788. 2019-08-17 21:14:16 +03:00
Rachel Mant f431cff809 Make .extract_objects() work correctly as an input to custom_target 2019-08-17 21:12:56 +03:00
Dylan Baker 06dcbd50ee compilers: Dispatch to dynamic linker class
Most of the cuda code is from Olexa Bilaniuk.
Most of the PGI code is from Michael Hirsc
2019-08-14 13:13:23 -07:00
Aleksey Gurtovoy e5b515aa1d ninjabackend: Squish Coco support 2019-08-10 01:00:28 +03:00
Jussi Pakkanen 2e6df380f1
Merge pull request #5644 from bonzini/meson-exe-cmdline
Show command line in `ninja -v` for `capture: true` custom targets and generators
2019-08-03 01:28:27 +03:00
Jussi Pakkanen 7ce2a24f42 Made dist a top level command. 2019-07-23 23:26:46 +03:00
Dylan Baker 24c4c079e7 linkers: Add get_base_link_args method to static linkers
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-23 09:58:24 +00:00
Nirbheek Chauhan 9c2724bce5 Add optional progress bar when generating build.ninja 2019-07-20 17:02:15 +03:00
Paolo Bonzini d34e532020 backends: do not split command and arguments in ExecutableSerialisation
This is not needed anymore, just make a single field with the whole
command line.
2019-07-19 00:17:29 +02:00
Paolo Bonzini b4d313b058 backends: remove unnecessary fields from ExecutableSerialisation
"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-19 00:17:29 +02:00
Paolo Bonzini ed348b7da8 backends: discover java/mono wrapper at generation time
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-19 00:17:29 +02:00
Paolo Bonzini 8239d71025 backends: create ExecutableSerialisation in meson_exe if possible
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-19 00:17:29 +02:00
Paolo Bonzini 2912f44e9c backends: always serialize custom targets if they need a wrapper 2019-07-19 00:17:29 +02:00
Paolo Bonzini f95c965043 backends: choose whether to serialize in as_meson_exe_cmdline
This removes more duplicate code between custom targets and generators.
In addition, generators can now have arguments with newlines in them.
2019-07-19 00:17:29 +02:00
Paolo Bonzini eb5aff8b76 vs2010backend: always serialize executables for generators
Do the same as for custom targets.
2019-07-19 00:17:29 +02:00
Paolo Bonzini 3ef7b23178 backends: hide meson --internal exe cmdline from backends
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-19 00:17:29 +02:00
Xavier Claessens d8b3af00ac vs backend: commandrunner.py takes source dir first 2019-07-10 15:01:18 -04:00
Xavier Claessens 12d4031f52 Add alias_target() function 2019-07-10 15:01:18 -04:00
Dylan Baker 866d105036 xcodebackend: Fix iterating compilers after host/build changes
Fixes #5570
2019-06-30 00:29:39 +03:00
John Ericson 3f280a81fd Remove build host mixing warning on native
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-28 22:12:55 +03:00
James Westman 77c3e6a4aa Fix two errors when cross-compiling with Vala
- 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-27 21:28:54 +03:00
Dylan Baker 6e4e0028a1 meson_exe: Don't assert that we need an exe_wrapper when we say we don't need one
Fixes cross compiling mesa from x86_64 -> x86 on an x86_64 system.

Fixes #5567
2019-06-27 21:06:41 +03:00
Dylan Baker ec97bedd8a
Merge pull request #5524 from scivision/icl_ifort
Add ifort on Windows
2019-06-24 16:41:10 -07:00
Marcel Hollerbach f39d2cc3bf meson: add cache for getting options
calling this function too ~60 sec. before, now 0.000435 sec.
2019-06-24 22:26:58 +03:00
Michael Hirsch, Ph.D 5b109c9ad2 correct missing argument for IntelClFortranCompiler
ifort passes all tests

cleanup logic
2019-06-24 14:06:32 -04:00
Michael Hirsch, Ph.D ef53107f14 BUGFIX: Fortran module regex handle more edge cases 2019-06-23 17:27:46 +03:00