| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Identify Cygwin-targetted gcc as sui generis (don't use -fPIC, but don't
link with standard Windows libraries, either)
Update tests appropriately
|
| |
|
|
|
|
| |
Also don't add CFLAGS twice for links() checks
Includes a test for this.
|
| |
|
|
|
| |
This allows people to use spaces in the environment variables as long
as they use the correct quoting.
|
| |
|
|
|
| |
We will use `get_define` to implement a function that fetches the
values of defines from headers.
|
| |
|
|
|
|
| |
Then, only use it if it's actually available.
Closes https://github.com/mesonbuild/meson/issues/1471
|
| |
|
|
| |
executable. Closes #1414.
|
| |
|
|
| |
Pointed out by Mike Sinkovsky
|
| |
|
|
|
|
|
| |
These compilers are available in MinGW and can be built on macOS.
More interestingly, `gcc` is a wrapper around `clang` on macOS, so we
will detect the compiler type incorrectly on macOS without this.
|
| |
|
|
|
|
|
|
| |
If you pass options, the last element in the array won't be the
compiler basename, so just check if the basename is in the exelist
somewhere.
Includes a test.
|
| |
|
|
|
| |
The mechanism is identical which means there's a high likelihood of
unintended divergence. In fact, a slight divergence was already there.
|
| |
|
|
|
|
|
|
| |
https://github.com/mesonbuild/meson/pull/1406 had an incomplete fix
for this. The test case caught it.
Note: this still doesn't test that setting it in the cross-info works,
but it's the same codepath as via the environment so it should be ok.
|
| |
|
|
|
|
|
|
| |
https://github.com/mesonbuild/meson/pull/1406 had an incomplete fix
for this. The test case caught it.
Note: this still doesn't test that setting it in the cross-info works,
but it's the same codepath as via the environment so it should be ok.
|
| |
|
|
| |
That way if the path has spaces, it won't get messed up.
|
| |
|
|
| |
See https://github.com/mesonbuild/meson/pull/1388
|
| |
|
|
|
| |
This was being duplicated across C/C++/ObjC/ObjC++/Fortran and hence
was behaving slightly differently in each.
|
| | |
|
| | |
|
| |\
| |
| | |
cross_file: add support for "ccache"
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Hanlde correctly a multi command string in evironment variable, e.g.:
CC="ccache gcc" meson
- Handle correctly a list for the cross-file option, e.g:
[binaries]
c = ['ccache', '/usr/local/bin/mips-linuc-gcc']
This commit fixes #1392.
|
| | |
| |
| |
| |
| | |
Use shlex.split() for splitting the env var instead of str.split() to
handle quoting and spaces in paths.
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This change helps us run on older distros such as Ubuntu LTS which is
very lazy in updating even non-core and stable packages such as Ninja.
Ninja 1.6.x is only needed for running the tests.
|
| |
|
|
|
|
|
|
|
|
|
| |
Added IntelCompiler, IntelCCompiler and IntelCCompiler.
environments.py has been changed to detect icc and icpc.
ninjabackend changed for proper pch generation.
ICC 17.0.0 does not support C++13 (that's why default arguments tests fails).
Test 25 object extraction fails due to some unescaped whitespaces.
Some test with vala fail because of successful build, although they
should fail, as warning do not exit with failure.
|
| | |
|
| |
|
|
|
|
| |
E128: continuation line under-indented for visual indent
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
| |
|
|
|
|
| |
E225: missing whitespace around operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
| | |
|
| |\
| |
| | |
Trivial cleanups in code
|
| | |
| |
| |
| |
| |
| | |
Let's be more pythonic and 'not is' seems really weird.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found by Igor Gnatenko
************* Module mesonbuild.interpreter
E:1232,33: No value for argument 'interp' in constructor call (no-value-for-parameter)
************* Module mesonbuild.dependencies
E: 68, 4: An attribute defined in mesonbuild.dependencies line 39 hides this method (method-hidden)
************* Module mesonbuild.environment
E: 26, 0: class already defined line 19 (function-redefined)
E: 68,18: Undefined variable 'InterpreterException' (undefined-variable)
E:641,39: Undefined variable 'want_cross' (undefined-variable)
E:850,94: Undefined variable 'varname' (undefined-variable)
E:854,94: Undefined variable 'varname' (undefined-variable)
E:860,102: Undefined variable 'varname' (undefined-variable)
E:863,94: Undefined variable 'varname' (undefined-variable)
************* Module mesonbuild.modules.gnome
E:438,26: Undefined variable 'compilers' (undefined-variable)
|
| | |
|
| |
|
|
|
|
|
| |
Can't just #include them and use them directly in unity builds. Inline
assembly is a thing, but it's not trivial and is deprecated with some
compilers. Just build them separately and link them in. Ideally the user
would then use LTO to ensure the same result.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Also C++ compilers can build .S assembly files. This wasn't noticed
earlier because most people were also using C compilers in their C++
projects and we would fall back to using the C compiler for building the
assembly files. Now we have a test for this.
This was trivial to add; except that we needed a new LLVM IR rule
because the compiler emits warnings if you pass any special arguments to
it such as include arguments or dependency arguments.
Closes #1089
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of adding it everywhere manually, create a wrapper called
mesonlib.Popen_safe and use that everywhere that we call an executable
and extract its output.
This will also allow us to tweak it to do more/different things if
needed for some locales and/or systems.
Closes #1079
|
| |
|
|
|
|
| |
Also convert a few other generic `except Exception`s to be more specific
Closes #1088
|
| | |
|
| |
|
|
|
|
|
| |
According to
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html,
the macros used to get the version are always defined for those
languages, so use them to get the version.
|
| |
|
|
|
|
| |
The method takes a dictionary with defines names as keys and the defines
values as values. From it, we assemble the gcc version, using 0 as a
default value if the define we want is not defined.
|
| | |
|
| |
|
|
|
|
| |
Seems better to do this since the behaviour is compiler-specific. Would
be easier to extend this later too in case we want to do more
compiler-specific things.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When installing Meson, distutils may choose to put shim scripts in the
`PATH` that only set up the egg requirements before launching the real
`meson.py` contained in the egg.
This means that `__file__` points to the real `meson.py` file, but
launching it directly is doomed to fail as it's missing the metadata
contained in the shim to set up the path egg, resulting in errors when
trying to import the `mesonbuild` module.
A similar issue affects Meson when installed as a zipapp, with the
current code going great lengths to figure out how to relaunch itself.
Using `argv[0]` avoids these issues as it gives us the way the current
executable has been launched, so we are pretty much guaranteed that
using it will create another instance of the same executable. We only
need to resolve relative paths as the current working directory may
get changed before re-launching the script, and using `realpath()` for
that saves us the trouble of manually resolving links and getting caught
in endless loops.
This also mean that `meson_script_file` no longer necessarily point to a
absolute file, so rename it to `_launcher` which hopefully would be less
prone to inducing false assumptions.
|
| | |
|
| |
|
|
|
|
|
| |
Fixes https://github.com/mesonbuild/meson/issues/650
Also adds new has_define and get_define internal API for querying
pre-processor defines provided by GNU compilers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's a terrible user experience to force people building 32-bit
applications on 64-bit Windows to use a cross-info file when every other
tool treats it as a 'native' compilation -- it satisfies all the
requirements for a native compile.
This commit also fixes the platform detection on Windows which would
cause the 'native cpu' to be detected as 32-bit if you installed 32-bit
Python on 64-bit Windows, or if you were building with a 32-bit
toolchain on 64-bit Windows.
Doesn't support MinGW yet -- the next commits will add that since the
changes required for that are more involved.
|
| |
|
|
| |
That is, isinstance(x, y) or isinstance(x, z) can be flattened with a
tuple to isinstance(x, (y, z)).
|