Commit Graph

410 Commits

Author SHA1 Message Date
Charlie Barto 1e182b51c6 Improve performance with windows defender ATP 2019-07-05 21:59:15 +03:00
Abhishek Pandit-Subedi 968aee4f18 Return zero in cross_sizeof
There is an error when compiling with -Werror=return-type. Non void
functions must return valid values.
2019-07-03 11:33:26 +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
Cody Schafer 11248eb203 sanitycheckc: avoid linking sanitycheckc when cross compiling 2019-06-27 20:36:09 +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
Dylan Baker e2039da5d9 Split attribute visibility
* c_function_attributes: remove 'protected' from 'visibility'

This doesn't exist on macos with the apple compiler, which always causes
failures.

Fixes #5530

* compilers: Add split visibility checks to has_function_attribute

These check for a single visibility at a time, rather than all four at
once. This allows for finer grained searches, and should make using
these checks safer across operating systems.
2019-06-25 00:02:26 +03:00
Michael Hirsch, Ph.D c89aa20941 known Python 3.5 on windows workaround for subprocess(cwd=str(Path)) 2019-06-24 14:06:33 -04:00
Michael Hirsch, Ph.D 1d6ed8cac8 windows ifort can't do shared_library sanely 2019-06-24 14:06:32 -04: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
Nirbheek Chauhan 9042130e9a compilers: Fix bitcode and other options for objc code
We were setting the base options for the Objective-C compiler
manually, due to which options such as b_bitcode and b_ndebug were not
getting set at all.

The base options here are the same as for C code with the Clang
compiler, so just use the same inherited list.

Also expand the bitcode test to ObjC and ObjC++ so this doesn't happen
again.
2019-06-23 16:50:24 +03:00
Jussi Pakkanen d1dd6df37b Increase logging for Rust CI failures. 2019-06-22 00:56:29 +03:00
Marvin Scholz fa431dddbc compilers: Add logging for symbol prefix test
Currently meson does not write the outcome of this test to the log
file which makes debugging wrong outcomes of this incredibly tedious.
2019-06-13 22:40:16 +03:00
Roman Shpuntov 3b17344b11 tvOS: added support AppleTVOS 2019-06-13 21:31:03 +03:00
Kurtis Rader e06f0e6aaf Solaris fixes
Fixes #5351
2019-06-12 14:14:57 +03:00
sompen 3c461bcf4f compilers: armclang supports only cross-compilation
Revert the change done to Armclang compiler class in PR-4010
2019-06-11 11:38:07 -07:00
sompen 201ecf52d1 compilers/cpp: Fix removal of name from Combo options for Armclang 2019-06-11 11:38:07 -07:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04:00
John Ericson 32e827dcdc Use `env.machines.*` to avoid some `is_cross`
This is a small example of the `is_cross` removal the that abstraction
enables.
2019-06-09 13:13:20 -04:00
Dylan Baker 5065db86f2 compilers/c: Fix removal of name from Combo options for ICL 2019-06-06 01:57:13 +03:00
Christoph Reiter 7ce9e56a4b Fix path splitting in get_compiler_dirs() with GCC/clang on Windows
It was using ':' as a path separator while GCC uses ';' resulting in bogus
paths being returned. Instead assume that the compiler uses the platform native
separator.

The previous splitting code still worked sometimes because splitting
"C:/foo;C:/bar" resulted in the last part "/bar" being valid if "<DriveOfCWD>:/bar"
existed.

The fix also exposes a clang Windows bug where it uses the wrong separator:
https://reviews.llvm.org/D61121 . Use a regex to fix those first.

This resulted in linker errors when statically linking against a library which
had an external dependency linking against system libs.

Fixes #5386
2019-05-16 23:05:49 +03:00
Dylan Baker 7f1cecf25b compilers/fortran: Fix all has_argument methods in meson
Apparently we have no tests for this because this is broken pretty
badly. This extends the basic test to actually check for the correct
free-form argument and thus test this.
2019-05-16 22:01:35 +03:00
John Ericson 4030e7cb7a UserOption no longer has a name field.
This avoids the duplication where the option is stored in a dict at its
name, and also contains its own name. In general, the maxim in
programming is things shouldn't know their own name, so removed the name
field just leaving the option's position in the dictionary as its name.
2019-05-15 14:21:47 +03:00
Jussi Pakkanen 7b8ef78bc0
Merge pull request #5331 from dcbaker/icl
ICL (Intel for Windows) support
2019-05-14 00:24:48 +03:00
Dylan Baker f5ea341319 compilers/clike: ICL needs msvc workarounds in has_function 2019-05-13 11:22:31 -07:00
Dylan Baker fa54f05f09 compilers: Add basic ICL abstractions 2019-05-13 11:22:31 -07:00
Dylan Baker c916024b41 compilers: ICL is not GCC like 2019-05-13 11:22:31 -07:00
Dylan Baker 080f59cf43 compilers: rename IntelCompiler to IntelGnuLikeCompiler
The Intel compiler is strange. On Linux and macOS it's called ICC, and
it tries to mostly behave like gcc/clang. On Windows it's called ICL,
and tries to behave like MSVC. This makes the code that's used to
implement ICC support useless for supporting ICL, because their command
line interfaces are completely different.
2019-05-13 11:22:31 -07:00
Dylan Baker 5fb64b0cfa compilers: Split msvc version code into helper
ICL needs ot use some of this code, but not from it's own version
information.
2019-05-13 11:22:31 -07:00
Dylan Baker 14fa3da33e compilers/cpp: Split code out of VisualStudioLikeCPPCompiler for treating c++11 as c++14
This restrictuion exists for MSVC and clang-cl, but not for ICL which
actually does support C++11 as a distinct standard. This commmit pulls
that behavior out into a mixin class for ClangClCPPCompiler and
VisualStudioCPPCompiler, as well as moving the MSVC specific
functionality into the VisualStudioCPPCompiler class.
2019-05-13 11:22:31 -07:00
nicole mazzuca 40ff089e69 Allow MSVC-style `cpp_eh` for backwards-compatibility purposes 2019-05-13 02:47:45 +03:00
Simon Ney 81170a9cbe This is the fork "sneyx1234/meson" of the current git "mesonbuild/meson" head to converge it to the solaris 11.4 platform based on the sparcv9 and i386 processor architecture.
The purpose is to complete the porting related to the fork "sneyx1234/ast" of "att/ast" the "AT&T kornshell".
2019-05-13 02:42:56 +03:00
Dylan Baker cb70a20490 compilers: make keyword args to Compiler.compile keyword only
Becuase treating args as either keyword or positional makes inheritance
really awful to work with.
2019-05-10 13:51:24 -07:00
Jussi Pakkanen 23f831a674
Merge pull request #5339 from dcbaker/clike
Split up the representations of the C and C++ compilers
2019-05-05 22:38:41 +03:00
nicole mazzuca 24d5c73b0a add -fno-exceptions if cpp_eh=none is specified 2019-05-05 21:19:04 +03:00
Dylan Baker 541523eeba compilers: Split C-Like functionality into a mixin classes
Currently C++ inherits C, which can lead to diamond problems. By pulling
the code out into a standalone mixin class that the C, C++, ObjC, and
Objc++ compilers can inherit and override as necessary we remove one
source of diamonding. I've chosen to split this out into it's own file
as the CLikeCompiler class is over 1000 lines by itself. This also
breaks the VisualStudio derived classes inheriting from each other, to
avoid the same C -> CPP inheritance problems. This is all one giant
patch because there just isn't a clean way to separate this.

I've done the same for Fortran since it effectively inherits the
CCompiler (I say effectively because was it actually did was gross
beyond explanation), it's probably not correct, but it seems to work for
now. There really is a lot of layering violation going on in the
Compilers, and a really good scrubbing would do this code a lot of good.
2019-05-03 10:36:50 -07:00
Dylan Baker da5f07cf39 Revert "detect Intel ICL on windows"
This reverts commit 3a75bb5259.
2019-05-02 14:56:23 -07:00
Dylan Baker c0aa89e57f
Merge pull request #4952 from mensinda/cacheCompiles
Cache compilers.compile() in coredata
2019-05-02 14:54:02 -07:00
Jussi Pakkanen 1f4023fa47
Merge pull request #5311 from mensinda/flake8Plugins
Added flake8 plugins and some code fixes
2019-05-02 23:30:29 +03:00
Michael Hirsch, Ph.D 06bfc2dab6 per-target manual specification of link_language 2019-05-02 23:26:51 +03:00
John Ericson 4c2617a9c6 Add some type annotations and fix lints
Some things, like `method[...](...)` or `x: ... = ...` python 3.5
doesn't support, so I made a comment instead with the intention that it
can someday be made into a real annotation.
2019-05-02 10:58:23 -07:00
Daniel Mensinger e75211d321
Fix builtin variable names 2019-04-29 12:17:40 +02:00
Daniel Mensinger bf98ffca9e
Fix blind exceptions 2019-04-29 12:16:06 +02:00
Daniel Mensinger c61ae46461
Moved caching into a seperate function 2019-04-28 14:33:22 +02:00
Daniel Mensinger 8a32fc8dbe
Disable cache for dependencies 2019-04-28 14:33:22 +02:00
Daniel Mensinger 47c06a7875
Add disable_cache to the fortran compiler 2019-04-28 14:33:22 +02:00
Daniel Mensinger 210fe5bf40
Add option to disable the cache 2019-04-28 14:33:21 +02:00
Daniel Mensinger 6969772a3e
Changing cached flag from True to False 2019-04-28 14:33:21 +02:00
Daniel Mensinger 0e91e4bdd1
Fixed typeing 2019-04-28 14:33:21 +02:00
Daniel Mensinger a351e0d64e
Annotaded return types in the base compiler class 2019-04-28 14:33:21 +02:00
Daniel Mensinger 971dfd664b
Added some cahced values 2019-04-28 14:33:21 +02:00