aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/clike.py
AgeCommit message (Collapse)AuthorFilesLines
2019-07-15compilers: Move clike into a mixins directoryDylan Baker1-1165/+0
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-14Do not fail on passing `-Werror=unused-parameter` from environmentDavid Seifert1-10/+10
2019-07-11Fix MSVC /link argument ordering (#5598)Norbert Nemec1-19/+32
* correct handling of LDFLAGS in find_library and sanity_check on MSVC (fixes #3629) The MSVC compiler requires all linker flags to be placed after the compiler flags, separated by a "/link" argument. This was already handled for regular linking commands, but not yet for the aforementioned special code paths. * on MSVC, add /link separator between compiler and linker flags when it is missing * avoid unnecessary /link argument
2019-07-10Make faster w defender atpCharlie Barto1-2/+2
2019-07-07move Gnu-specific feature '--print-search-dirs' to GnuLikeCompilerNorbert Nemec1-51/+0
2019-07-05Fix unittests.Jussi Pakkanen1-1/+4
2019-07-05compilers: Add missing cflags when calling compiler in link modeMarvin Scholz1-10/+11
2019-07-05compilers: Fix missing cflags for function detectionMarvin Scholz1-4/+4
Fix #5481
2019-07-05Improve performance with windows defender ATPCharlie Barto1-4/+4
2019-07-03Return zero in cross_sizeofAbhishek Pandit-Subedi1-0/+1
There is an error when compiling with -Werror=return-type. Non void functions must return valid values.
2019-06-27sanitycheckc: avoid linking sanitycheckc when cross compilingCody Schafer1-0/+2
2019-06-13compilers: Add logging for symbol prefix testMarvin Scholz1-0/+2
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-09Purge `is_cross` and friends without changing user interfacesJohn Ericson1-21/+15
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-09Use `env.machines.*` to avoid some `is_cross`John Ericson1-10/+11
This is a small example of the `is_cross` removal the that abstraction enables.
2019-05-16Fix path splitting in get_compiler_dirs() with GCC/clang on WindowsChristoph Reiter1-9/+21
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-13compilers/clike: ICL needs msvc workarounds in has_functionDylan Baker1-1/+1
2019-05-10compilers: make keyword args to Compiler.compile keyword onlyDylan Baker1-1/+1
Becuase treating args as either keyword or positional makes inheritance really awful to work with.
2019-05-03compilers: Split C-Like functionality into a mixin classesDylan Baker1-0/+1187
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.