summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * compiler: Fix compute_int and sizeof for cross compilation.Haakon Sporsheim2017-03-101-29/+31
| | | | | | | | sizeof now uses compute_int which again binary searches for correct value.
| * compiler: Add compute_int functionality.Haakon Sporsheim2017-03-091-0/+28
| | | | | | | | Fixes #435
* | d: Handle linker search paths correctly for non-GNU compilersMatthias Klumpp2017-03-211-0/+10
| |
* | has_header: Use "foo.h" syntax instead of <foo.h>Nirbheek Chauhan2017-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is broken on GCC due to a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80005 It doesn't matter whether we use <> or "" in our checks because we run them from an empty temporary directory anyway. Includes a test for all this. Closes https://github.com/mesonbuild/meson/issues/1458
* | Add UNIX large file support via compiler always-argsNirbheek Chauhan2017-03-101-4/+33
|/ | | | | | | | | | | | | | | | | | | | | | On 32-bit Linux and BSD, all libcs support this. Musl always enables it, and UClibc behaves like Glibc unless it's built without large file support (which is a terrible idea). http://wiki.musl-libc.org/wiki/FAQ#Q:_do_i_need_to_define_LARGEFILE64_SOURCE_to_get_64bit_off_t_.3F https://git.uclibc.org/uClibc/tree/include/features.h#n326 macOS now only ships 64-bit, so this is irrelevant there. 32-bit Windows and older versions of Bionic do not have transparent large file support and you must use lseek64, etc there, so this won't affect those. Newer Bionic versions behave like Glibc in theory. https://msdn.microsoft.com/en-us/library/1yee101t.aspx http://code.google.com/p/android/issues/detail?id=64613 Includes a linuxlike test for this. Closes https://github.com/mesonbuild/meson/issues/1032
* Detect GCC type on macOS for ObjC/C++ tooNirbheek Chauhan2017-02-211-10/+6
| | | | | | | 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.
* Add auto option to b_colored when using Clang. Remove Clang version check ↔Rodrigo Lourenço2017-02-201-4/+3
| | | | when enabling colored output.
* Update minimum Clang version for colored outputRodrigo Lourenço2017-02-201-1/+1
|
* Add b_colorout option for Clang compilers.Rodrigo Lourenço2017-02-191-1/+10
|
* compilers: Don't use CompilerArgs() for sanity checksNirbheek Chauhan2017-02-021-2/+2
| | | | | | | | | | | It's only useful to use those when you have to override include dirs or library paths by appending them from various sources according to the priority order, or if the compiler args need to be converted from Unix/GCC-style to native (MSVC, for instance) style. Sanity checks match neither of these. Closes https://github.com/mesonbuild/meson/issues/1351
* Add get_no_stdinc_args() for C++ tooNirbheek Chauhan2017-01-281-0/+3
|
* compilers: New class CompilerArgs derived from list()Nirbheek Chauhan2017-01-271-83/+218
| | | | | | | | | | | | | | | | | The purpose of this class is to make it possible to sanely generate compiler command-lines by ensuring that new arguments appended or added to a list of arguments properly override previous arguments. For instance: >>> a = CompilerArgs(['-Lfoo', '-DBAR']) >>> a += ['-Lgah', '-DTAZ'] >>> print(a) ['-Lgah', '-Lfoo', '-DBAR', '-DTAZ'] Arguments will be de-duped if it is safe to do so. Currently, this is only done for -I and -L arguments (previous occurances are removed when a new one is added) and arguments that once added cannot be overriden such as -pipe are removed completely.
* Merge pull request #1328 from centricular/has-function-prefixJussi Pakkanen2017-01-261-145/+163
|\ | | | | Add prefix before including limits.h in has_function checks
| * compilers: Don't run built-in checks on MSVCNirbheek Chauhan2017-01-261-0/+4
| | | | | | | | | | MSVC does not have built-ins, so this is totally useless. Instead, add a test for intrinsics to ensure that we do find them.
| * compilers: Fix has_function check for builtinsNirbheek Chauhan2017-01-261-24/+25
| | | | | | | | | | | | | | | | | | | | | | Use a single check for both cases when we have includes and when we don't. This way we ensure three things: 1. Built-in checks are 100% reliable with clang and on macOS since clang implements __has_builtin 2. When the #include is present, this ensures that __builtin_func is not checked for (because of MSYS, and because it is faster) 3. We fallback to checking __builtin_func when all else fails
| * compilers: Add prefix before limits.h in has_function checksNirbheek Chauhan2017-01-261-5/+7
| | | | | | | | | | | | | | | | prefix might define _GNU_SOURCE, which *must* be defined before your first include of limits.h, so we must define it first. There's not really any downsides to including limits.h after the prefix.
| * compilers: Pass -fpermissive on all C++ compilers except MSVCNirbheek Chauhan2017-01-261-14/+11
| |
| * compilers: Use named placeholders for string formattingNirbheek Chauhan2017-01-261-123/+120
| | | | | | | | This makes it much clearer what each placeholder will be formatted to.
| * compilers: Fix builtin checks with clang on LinuxNirbheek Chauhan2017-01-261-1/+10
| | | | | | | | | | | | | | | | | | Our "43 has function" test should also work with clang and icc on Linux, so enable them. Also detect builtins with __has_builtin if available, which is much faster on clang. There is a feature request for the same with GCC too: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970
| * compilers: Use __has_include macro for has_header checksNirbheek Chauhan2017-01-241-2/+10
| | | | | | | | | | | | | | If it's available, it's much much faster than doing #include + preprocess. Speeds up has_header checks by about 40% for me. Currently, only Clang supports this
| * compilers: Remove unnecessary arguments to super()Nirbheek Chauhan2017-01-241-2/+2
| |
* | Use --coverage rather than hardcoding -lgcov. Closes #1311.Jussi Pakkanen2017-01-231-1/+1
|/
* Merge pull request #1320 from centricular/fix-llvmir-and-assemblyJussi Pakkanen2017-01-231-3/+4
|\ | | | | Fix llvmir and assembly
| * Fix targets with generated LLVM IR and Assembly sourcesNirbheek Chauhan2017-01-211-3/+4
| | | | | | | | | | | | | | | | These two are also C-like sources, so don't ignore them in backends/ninjabackend.py:generate_target() when we call is_source() on the list of generated sources for that target. Closes #1318
* | cleanup: Remove redundant parenthesesMike Sinkovsky2017-01-181-12/+12
|/
* style: [E1**] IndentationMike Sinkovsky2017-01-111-6/+3
|
* style: [E721] do not compare types, use 'isinstance()'Mike Sinkovsky2017-01-111-2/+2
|
* Merge pull request #1272 from mesonbuild/ignatenko/lintJussi Pakkanen2017-01-031-2/+2
|\ | | | | fix some linting errors
| * style: fix E127 violationsIgor Gnatenko2017-01-021-2/+2
| | | | | | | | | | | | E127: continuation line over-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * style: fix E202 violationsIgor Gnatenko2017-01-021-1/+1
| | | | | | | | | | | | E202: whitespace before ']' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | ifort: Derive from IntelCompiler base classNirbheek Chauhan2017-01-041-7/+9
| | | | | | | | | | | | And fix the list of supported file suffixes, and use .f90 for all fortran tests since ifort, the Intel Fortran compiler ignores files ending with .f95, .f03, and .f08
* | icc: Always specify the language to use for PCH usageNirbheek Chauhan2017-01-041-1/+5
| | | | | | | | | | Without this, ICC sometimes gets confused and thinks that the included header is a C header instead of a C++ header.
* | compilers.py: Use a common variable for warn argsNirbheek Chauhan2017-01-041-36/+39
| | | | | | | | Makes it totally clear what extra args are added by each warning level.
* | compilers: gnu++03 is not a valid Clang C++ standardNirbheek Chauhan2017-01-041-1/+1
| | | | | | | | | | | | It is not (no longer?) supported by Clang: error: invalid value 'gnu++03' in '-std=gnu++03'
* | icc: Fix C/C++ std options and add a unit test for themNirbheek Chauhan2017-01-041-17/+20
| | | | | | | | | | | | | | | | | | Compiler versions 15.0 and later actually ignore invalid values for the -std= option unless `-diag-error 10159` is passed, so we need to put that in the unit test. I have tested this with versions 14.0.3, 15.0.6, 16.0.4, and 17.0.1. Would be great if someone could test with 13.x.y
* | ICC 17.0.0 working for Linux and Ninja Backend.Philipp Geier2017-01-041-2/+139
| | | | | | | | | | | | | | | | | | | | | | Added IntelCompiler, IntelCCompiler and IntelCCompiler. environments.py has been changed to detect icc and icpc. ninjabackend changed for proper pch generation. ICC 17.0.0 does not support C++13 (that's why default arguments tests fails). Test 25 object extraction fails due to some unescaped whitespaces. Some test with vala fail because of successful build, although they should fail, as warning do not exit with failure.
* | fix 'unreachable code' warningsMike Sinkovsky2017-01-031-1/+0
| |
* | fix 'method signature does no match signature of overridden method'Mike Sinkovsky2017-01-031-1/+1
|/
* fix for cross-builds targeting macosxMike Sinkovsky2017-01-021-19/+21
|
* style: fix E124 violationsIgor Gnatenko2017-01-011-5/+5
| | | | | | E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E265 violationsIgor Gnatenko2017-01-011-1/+1
| | | | | | E265: block comment should start with '# ' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E231 violationsIgor Gnatenko2017-01-011-2/+2
| | | | | | E231: missing whitespace after ',' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E226 violationsIgor Gnatenko2017-01-011-10/+10
| | | | | | E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E225 violationsIgor Gnatenko2017-01-011-1/+1
| | | | | | E225: missing whitespace around operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Fix space before :.Jussi Pakkanen2016-12-311-98/+98
|
* gdc: Make dependency check workMatthias Klumpp2016-12-231-3/+1
| | | | | The -fmake-deps command does not segfault anymore, and if it is used with "=" there will also be no "file not found" error.
* d: Correctly set SONAME on D shared librariesMatthias Klumpp2016-12-211-1/+2
| | | | All D compilers use the system linker, which is very convenient here.
* ldc/dmd: Properly set warning argumentsMatthias Klumpp2016-12-211-4/+7
|
* Merge pull request #1233 from mesonbuild/wip/ignatenko/code-styleJussi Pakkanen2016-12-211-3/+3
|\ | | | | Trivial cleanups in code
| * tree-wide: remove trailing whitespacesIgor Gnatenko2016-12-191-3/+3
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>