Commit Graph

16 Commits

Author SHA1 Message Date
Dylan Baker b5e077fce8 compilers: Move things out of clike
One method belongs in the base Compiler class, the other belongs in
the GnuLikeCompiler class.
2020-04-10 12:33:34 -07:00
Michael Hirsch, Ph.D 5b4ebb5641 quality / test: Fortran type hinting
enhance fortran args tests
2020-04-05 13:43:53 +03:00
Andrei Alexeyev 96ed64caa1 Make cc.has_function work on GCC/Clang __builtins 2020-04-04 20:51:35 +03:00
Richard Weinberger 12fa8d06e2 Fix exe_wrapper usage in EmptyExternalProgram case
If no exe_wrapper is set in the meson cross file the exe_wrapper
object will be an instance of EmptyExternalProgram.
So, found is True and prorgram is an empty list.

This will cause meson to tun the compiler sanity check because
it checks only for self.is_cross and self.exe_wrapper being
not None.

I ran into that situation while cross compiling for ia32 on a
x64_64 host. The host had no ia32 userspace installed, so the
self test failed.

As workaround I currently set exe_wrapper to 'true'.

Signed-off-by: Richard Weinberger <richard@nod.at>
2020-03-19 19:09:18 +02:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Daniel Mensinger e4a0ee205d lgtm: Fix redundant code 2019-12-05 00:22:10 +02:00
Xavier Claessens e4e5f981eb Fix compute_int() when the value is -1 2019-11-21 01:32:11 +02:00
Michael Hirsch, Ph.D 83b4e981c4 Use strict function prototypes 2019-11-18 22:21:36 +02:00
Aleksey Gurtovoy 6ac5db50c9 CUDA support on Windows 2019-09-24 14:22:20 -07:00
Jehan 179861ccd1 mesonbuild: fix exception name.
CrossNoRunException is in compilers module, not mesonlib.
2019-09-23 13:25:53 -04: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
Michael Hirsch, Ph.D 7eebb6749a
no special shared lib args for PGI 2019-07-30 15:29:51 -04:00
Martin Liska c1870889b1 Fix missing return statements that are seen with -Werror=return-type.
Error example:

Code:

        #include <locale.h>
        int main () {
            /* If it's not defined as a macro, try to use as a symbol */
            #ifndef LC_MESSAGES
                LC_MESSAGES;
            #endif
        }
Compiler stdout:

Compiler stderr:
 In file included from /usr/include/locale.h:25,
                 from /tmp/tmpep_i4iwg/testfile.c:2:
/usr/include/features.h:382:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
  382 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
/tmp/tmpep_i4iwg/testfile.c: In function 'main':
/tmp/tmpep_i4iwg/testfile.c:8:9: error: control reaches end of non-void function [-Werror=return-type]
    8 |         }
      |         ^
cc1: some warnings being treated as errors
2019-07-16 09:49:03 +02:00
Dylan Baker f574beffb4 compilers/mixins/elbrus: add type annotations and fix types
There is a pretty big error in here, trying to return a tuple
comperhension: (a for a in []) is not a tuple, it's a generator. This
has profound type annotations: generators don't support most tuple or
list methods, and they can only be iterated once. Beyond that tuples are
meant for heterogenous types, ie, position matters for types. I've
converted the output to a list in all cases.
2019-07-15 10:59:22 -07:00
Dylan Baker 214ab455d3 compilers: Move the VisualStudioLikeCompiler class into mixins 2019-07-15 10:59:22 -07:00
Dylan Baker d483da46a9 compilers: Move clike into a mixins directory
The compilers module is rather large and confusing, with spaghetti
dependencies going every which way. I'm planning to start breaking out
the internal representations into a mixins submodule, for things that
shouldn't be required outside of the compilers module itself.
2019-07-15 10:59:22 -07:00