Commit Graph

10 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
Cody Schafer 11248eb203 sanitycheckc: avoid linking sanitycheckc when cross compiling 2019-06-27 20:36:09 +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
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
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 f5ea341319 compilers/clike: ICL needs msvc workarounds in has_function 2019-05-13 11:22:31 -07: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
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