Commit Graph

121 Commits

Author SHA1 Message Date
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
Jon Turney 5af98a5ee8 Use correct shared library naming for Cygwin
Use correct shared library naming for Cygwin when building and installing
2017-04-06 22:47:15 +01:00
Jon Turney cbc5064a67 Don't use -fPIC on Cygwin, either
Identify Cygwin-targetted gcc as sui generis (don't use -fPIC, but don't
link with standard Windows libraries, either)

Update tests appropriately
2017-04-06 22:47:15 +01:00
Nirbheek Chauhan 6042e21e25 Use CPPFLAGS for pre-processor compiler checks
Also don't add CFLAGS twice for links() checks

Includes a test for this.
2017-04-04 23:38:36 +05:30
Nirbheek Chauhan 09fee02dd9 Use shlex.split() to split CFLAGS/LDFLAGS/etc
This allows people to use spaces in the environment variables as long
as they use the correct quoting.
2017-04-04 22:30:13 +05:30
Nirbheek Chauhan d0d7cbd88b compilers: Rename 'get_define' to 'get_builtin_define'
We will use `get_define` to implement a function that fetches the
values of defines from headers.
2017-04-04 22:30:13 +05:30
Nirbheek Chauhan cfc3605b73 Detect 'ccache' in evars and cross-info files
Then, only use it if it's actually available.

Closes https://github.com/mesonbuild/meson/issues/1471
2017-03-25 17:56:13 +02:00
Jussi Pakkanen b927468137 Use cross stripper when cross compiling and allow overriding native strip executable. Closes #1414. 2017-02-27 16:49:32 -05:00
Nirbheek Chauhan 4f0e204c34 Fix undefined variables in ObjC/C++ detection
Pointed out by Mike Sinkovsky
2017-02-26 07:28:27 -05:00
Nirbheek Chauhan 8e48f23262 Detect GCC type on macOS for ObjC/C++ too
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.
2017-02-21 01:36:08 +05:30
Nirbheek Chauhan 69e83d6aed Support passing of options to compilers and linkers
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.
2017-02-21 01:36:08 +05:30
Nirbheek Chauhan 003e0a0610 Use the same function for detection of C and C++ compilers
The mechanism is identical which means there's a high likelihood of
unintended divergence. In fact, a slight divergence was already there.
2017-02-21 01:36:08 +05:30
Nirbheek Chauhan 56a8b2a181 Fix static linker exelist in cross-info and environment
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.
2017-02-21 01:36:08 +05:30
Nirbheek Chauhan 798c349e35 Fix compiler exelist in cross-info and the environment
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.
2017-02-21 01:36:08 +05:30
Nirbheek Chauhan 68eea4818d environment: Use shlex.split() to get AR from the env
That way if the path has spaces, it won't get messed up.
2017-02-21 01:36:08 +05:30
Hase Bastian 283d5e6233 Detect (non-Apple) clang as objc/c++ compiler
See https://github.com/mesonbuild/meson/pull/1388
2017-02-21 01:35:56 +05:30
Nirbheek Chauhan 238d1a37a0 Factor out common code in compiler detection
This was being duplicated across C/C++/ObjC/ObjC++/Fortran and hence
was behaving slightly differently in each.
2017-02-21 01:35:56 +05:30
Jussi Pakkanen c76dcdb62b Fix the rest of them. 2017-02-19 21:56:33 +02:00