Commit Graph

138 Commits

Author SHA1 Message Date
Jussi Pakkanen bfa6c8d074
Merge pull request #2938 from acfoltzer/rust-cross-merge
Add cross-compilation support for `rustc`
2018-02-04 00:44:09 +02:00
Adam C. Foltzer 1d81efb03d Add cross-compilation support for `rustc`
This patch is largely modeled on the relatively-straightforward code
for Fortran cross-compilation, so there might be some intricacies
missing.
2018-01-29 15:47:05 -08:00
Aleksey Filippov 2cf85ae16f Use os.path: basename() and dirname() instead of split()
According to Python documentation[1] dirname and basename
are defined as follows:
    os.path.dirname() = os.path.split()[0]
    os.path.basename() = os.path.split()[1]
For the purpose of better readability split() is replaced
by appropriate function if only one part of returned tuple
is used.

[1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-30 07:08:22 +11:00
Edward Betts bdfcecd2c6 Correct spelling mistakes. 2018-01-19 15:53:00 +02:00
Matthias Klumpp 5133d8650f d: Detect recent DMD compilers
They now are published by the D Language Foundation, and not Digital
Mars. Therefore, their signature has changed slightly.
(We can not check for 'DMD', because that string appears in every
compiler version output to denote the frontend version used by the
compiler).
2018-01-07 19:52:07 +02:00
Nirbheek Chauhan ae0f4ef055 compilers: Fix error when objc/objc++ compilers are not found
Earlier it would exit with a traceback:

UnboundLocalError: local variable 'out' referenced before assignment
2017-12-30 18:02:28 +02:00
Christoph Behle 7bd30c522b Fix flake8 issues. 2017-12-16 16:12:46 +01:00
Christoph Behle 1f3b41021d More version information for Fortran. 2017-12-16 15:38:31 +01:00
Christoph Behle 5b83894b77 More version information for D 2017-12-16 15:07:08 +01:00
Christoph Behle 783263b9f4 More version information for C# 2017-12-16 15:05:09 +01:00
Christoph Behle c6acf75617 More version information for compilers.
See issue #2762
Adds full_version to class Compiler. If set full_version will be printed
additionally.
Added support for CCompiler and CPPCompiler
Added support for gcc/g++, clang/clang++, icc.
2017-12-16 14:52:08 +01:00
Josh Soref 2b0505f222 spelling: targeting 2017-11-26 06:15:13 +00:00
Jussi Pakkanen 22adda1617 Review fixes. 2017-11-21 23:29:06 +02:00
Jussi Pakkanen 5d51bc79c7 Replaced sys.executable use with the mesonlib equivalent. 2017-11-20 23:08:17 +02:00
Nirbheek Chauhan d2a250412c compilers: Improve manual library searching
We can now specify the library type we want to search for, and whether
we want to prefer static libraries over shared ones or the other way
around. This functionality is not exposed to build files yet.
2017-11-11 23:06:48 +05:30
Elliott Sales de Andrade 6715087598 Dump coredata earlier.
Unfortunately, `time.time` and file timestamps are not guaranteed to be
in sync and due to various kernel caches may be different enough to
cause rebuilds to fail [1]. This was masked by older ninja versions that
could not read sub-second timestamps.

[1] https://travis-ci.org/mesonbuild/meson/jobs/296797872
2017-11-06 20:56:53 +02:00
Dylan Baker 4e394b3341 dependencies: Add function to strip system -L paths
PkgConfig automatically removes -L paths from libdirs if the -L points
to a system path. It knows what these paths are by taking this as a
configure option at build time, which the distro maintainers set
appropriately and everything works. This allows one to have two
versions of a package installed, a system and non system, and then
override PKG_CONFIG_PATH to use the non system version, and everything
just works. For non-pkgconfig dependencies (such as LLVM) meson needs to
strip these themselves to avoid breaking the above use case.
2017-10-21 10:36:00 -07:00
Nirbheek Chauhan 7c2ae55fab Revert "Revert "Merge pull request #1931 from centricular/use-patched-ninja""
This reverts commit 5eb64a6f3e.

Let's try again, with a fixed Ninja by QuLogic.
2017-09-18 18:40:24 +03:00
William D. Jones 48e7398add Check if Watcom version of cl exists in the path and avoid using it. (#2237) 2017-08-23 15:39:09 +03:00
Philippe Payant f83be23d55 Remove trailing spaces. 2017-08-23 15:22:02 +03:00
Philippe Payant fc92991e34 Fix detection of MSVC 2008 version. 2017-08-23 15:22:02 +03:00
Jussi Pakkanen 50fb7d37ab Make all functionality invokable via the main Meson binary,
which can be a Windows .exe file.
2017-08-18 12:08:20 +03:00
YmrDtnJu 0929812eb5 Do not ignore stderr on gcc type check in get_gnu_compiler_defines.
As stderr may contain information the user can use to solve the problem with
the gcc installation, it should not be ignore but added to the error message.
2017-08-10 10:43:39 +03:00
Paulo Antonio Alvarez bc30ad6dba environment: Read VALAC from the environment and use it if set
The valac binary was hard coded in meson. We now check if VALAC is
defined in the environment, and if it is, use its value as the vala
compiler, if not, we proceed with the hard coded binary name.
2017-08-09 21:47:19 +03:00
Jussi Pakkanen 7f307fd5ef Update list of compiler executable names to try. 2017-07-31 07:08:07 -04:00
Jussi Pakkanen e89b6cdd10 Merge pull request #1374 from mesonbuild/simd
Add support for SIMD detection
2017-07-19 15:50:04 +03:00
Jussi Pakkanen db34a3a701 Close files reliably. 2017-07-18 00:33:08 +02:00
Jussi Pakkanen 5eb64a6f3e Revert "Merge pull request #1931 from centricular/use-patched-ninja"
This reverts commit aab7ada356, reversing
changes made to e1b24765af.
2017-07-18 00:30:52 +02:00
Nirbheek Chauhan afdaedea01 msvc: Split stderr by line and raise exception if empty
std.split() splits on whitespace, but we want the first line.
2017-07-17 19:20:00 +03:00
Jussi Pakkanen 8396c4f3e6 Added VS support to simd detector. 2017-07-17 19:15:04 +03:00
Nirbheek Chauhan e307865596 ninja backend: Detect ninja only once and log it
Needed for the CI, but good to have in general too.
2017-07-17 17:26:21 +05:30
Elliott Sales de Andrade b52955ff3d Run postconf scripts after dumping coredata.
MESONINTROSPECT is set when running postconf scripts, which implies that
introspection is possible. But it isn't really possible because coredata
hasn't been written yet. We also still need to make sure to delete
coredata if any postconf scripts fail.
2017-07-15 13:47:17 +02:00
Jehan d80787ae28 Output an appropriate warning when a cross info file does not exist.
If making a typo, it used to output:
>  Cross info file must have either host or a target machine.
This was not useful at all and looked like there could be a file format
error or some other issue with the content. Let's have an appropriate
error:
> File not found: /some/path
2017-07-02 10:08:08 -04:00
Nirbheek Chauhan 5dab5f1600 environment: Fix exception when no defines were found
Lists are not hashable.

Closes https://github.com/mesonbuild/meson/issues/1989
2017-06-26 14:16:13 -04:00
Alistair Thomas 117f4ab8b5 Split out languages from compilers.py 2017-06-23 00:42:41 +01:00
Alistair Thomas d71da5bdb3 Converted compilers.py to a sub-package 2017-06-22 20:12:42 +01:00
Alistair Thomas e5559903b3 Split linkers out from compilers.py 2017-06-22 20:09:58 +01:00
Jussi Pakkanen 7c03bfb463 Merged needs_exe_wrapper branch. 2017-06-07 20:09:43 +03:00
Alan 53e47d42f0 Set clang_type to CLANG_WIN on windows. 2017-06-03 23:45:59 +03:00
Ole André Vadla Ravnås b32c757073
environment: Add needs_exe_wrapper for overriding auto-detection.
This is useful when build_machine appears to be compatible with
host_machine, but actually isn't. For example when:
- build_machine is macOS and host_machine is the iOS Simulator
- the build_machine's libc is glibc but the host_machine libc is uClibc
- code relies on kernel features not available on the build_machine
2017-05-29 21:05:57 +02:00
Elliott Sales de Andrade 00f89b0f6e Fix undefined variables/methods. 2017-05-17 19:43:14 -04:00
Elliott Sales de Andrade 83d1c7f063 Rearrange trys to avoid possible undefined vars. 2017-05-17 05:37:02 -04:00
Elliott Sales de Andrade 65b1d33931 Remove unused imports. 2017-05-17 03:42:16 -04:00
Jussi Pakkanen b65b9fe271 More strict eval. 2017-05-01 19:30:55 +03:00
Dylan Baker 6944d06116 Don't use dict.keys() to check membership
It's much faster to do 'if a in dict' instead of 'if a in dict.keys()',
since the latter constructs an iterator and walks that iterator and then
tests equality at each step, and the former does a single hash lookup.
2017-04-28 22:42:39 +03:00
Thomas Hindoe Paaboel Andersen fbbd7289db Detect intel fortran compiler
The intel fortran compiler "ifort" was not listed in the list of
default fortran compilers. This caused it to not be found unless
explicitly set via the FC.
2017-04-28 22:30:26 +03:00
Jussi Pakkanen 476c263952 Unset compiler envvars in unit tests. 2017-04-23 02:00:28 +03:00
Guillaume Poirier-Morency aa486f5bb2 vala: Add 'VALAFLAGS' to considered environment variables
Fix precedence of arguments for Vala tasks and include those considered
external (i.e. '-Dvala_args' and 'VALAFLAGS').
2017-04-22 21:56:43 +03:00
Nirbheek Chauhan bf2af8b7f1 Use gcc-ar/llvm-ar as the static linker if available
Closes https://github.com/mesonbuild/meson/issues/1646
2017-04-21 17:05:21 +05:30
Nirbheek Chauhan 878b0f1401 Fix shared module installation directory on Windows 2017-04-10 03:38:04 +05:30