summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Add no-warning args while building Vala C codeNirbheek Chauhan2016-10-141-0/+14
| | | | | | | | | | | This is done by adding a new compiler method called 'no_warn_args' which returns the argument(s) required for the compiler to emit no warnings for that compilation. This take care of not disabling warnings for C code compiled into the BuildTarget. Also includes tests for ensuring all this. https://github.com/mesonbuild/meson/issues/864
* Merge branch 'QuLogic-compiler-file-checks'Jussi Pakkanen2016-10-121-85/+65
|\
| * Allow passing files to compile/link/run queries.Elliott Sales de Andrade2016-09-291-4/+7
| |
| * Reduce redundancy in compile/link/run queries.Elliott Sales de Andrade2016-09-291-85/+62
| |
* | Add an option to select if static libraries are built with -fPIC.Jussi Pakkanen2016-10-101-5/+8
| |
* | Fix soname to work on OSX.Jussi Pakkanen2016-10-081-11/+12
| |
* | Check that soname matches the filename. Closes #785.Jussi Pakkanen2016-10-081-1/+1
| |
* | compilers: Don't pollute c_args with -fPIC on OS XNirbheek Chauhan2016-10-081-4/+9
| | | | | | | | | | It's always enabled and the compiler just ignores all PIC-related arguments. Relatedly, do the same thing for Clang as GCC.
* | Set soname with clang properly.Jussi Pakkanen2016-10-021-0/+11
| |
* | Merge pull request #814 from centricular/heavy-cleanup-compilers-buildtargetsJussi Pakkanen2016-09-301-207/+101
|\ \ | |/ |/| Heavy cleanup in compilers and BuildTarget
| * compilers: Make GCC detection more robust on all platformsNirbheek Chauhan2016-09-271-11/+33
| | | | | | | | | | | | | | Fixes https://github.com/mesonbuild/meson/issues/650 Also adds new has_define and get_define internal API for querying pre-processor defines provided by GNU compilers.
| * compilers: Populate Rust and Vala compiler idsNirbheek Chauhan2016-09-261-2/+2
| | | | | | | | These two have only one implementation, so just name them as they are
| * compilers: Remove duplicate class methodsNirbheek Chauhan2016-09-261-66/+9
| | | | | | | | These can just be implemented by the base Compiler class
| * compilers: Consolidate language suffix mappingNirbheek Chauhan2016-09-261-128/+57
| | | | | | | | | | | | | | | | | | | | Instead of spreading it across the entire file and re-implementing can_compile for each compiler, consolidate it in one dictionary which the base compiler class can refer to based on self.language set by the child class. This has fixed a number of hidden and unreported bugs due to bitrotten can_compiler implementations.
* | Add dependency support to the checks using the compilerMatthew Waters2016-09-261-30/+47
|/ | | | | | | | | | | | | | | It is extremely common to need to know within a given dependency if a given header, symbol, member, function, etc exists that cannot be determined from the version number alone. Without passing dependency objects to the various compiler/linker checks and with many libraries headers/libraries being located in their own subdirs of the standard prefix, the check for the library would not find the header/function/symbol/etc. This commit allows passing dependency objects to the compiler checks so that the test program can be compiled/linked/run with the necessary compilation and/or linking flags for that library.
* compilers: Fix typo in visual studio warning argumentNirbheek Chauhan2016-09-251-1/+1
|
* compilers: Fall back to -pedantic with older GCCNirbheek Chauhan2016-09-251-0/+8
| | | | Fixes https://github.com/mesonbuild/meson/issues/242
* Option for ndebug.Jussi Pakkanen2016-09-161-2/+11
|
* Merge pull request #774 from mesonbuild/compilerreorgJussi Pakkanen2016-09-141-169/+93
|\ | | | | Move compiler common functionality to own class
| * Reorganisation.Jussi Pakkanen2016-09-101-20/+20
| |
| * Clang C++ compiler uses common class.Jussi Pakkanen2016-09-101-28/+11
| |
| * Factored Clang common stuff in its own class.Jussi Pakkanen2016-09-101-28/+32
| |
| * Moved base options to base class, because they are always the same.Jussi Pakkanen2016-09-101-18/+5
| |
| * Made objc compilers use Gnu class.Jussi Pakkanen2016-09-101-32/+4
| |
| * Made C++ compiler use GNU class.Jussi Pakkanen2016-09-101-78/+51
| |
| * Refactored GNU common functionality into its own class.Jussi Pakkanen2016-09-101-6/+11
| |
* | Merge pull request #684 from mesonbuild/pdbJussi Pakkanen2016-09-111-6/+27
|\ \ | |/ |/| Create pdb files with MSVC
| * vs: Never serialize debug file generation with /FSNirbheek Chauhan2016-09-111-6/+1
| | | | | | | | | | | | | | | | | | | | | | /FS forces .pdb file writing to be serialized through MSPDBSRV.EXE, which is supposed to solve concurrency issues (esp. with anti-viruses), but it doesn't actually always work. It also isn't needed anymore since we don't use a shared vcXXX.pdb temporary file for pdb writing and use /Fd to explicitly set a per-target pdb filename instead. Not serializing the PDB writing will make a large difference on fast disks when linking multiple libraries and executables simultaneously.
| * Moved targets with same name into subdirs to make all tests pass.Jussi Pakkanen2016-09-021-9/+6
| |
| * Create pdbs that work when using pch or doing extract object (sadly not both).Jussi Pakkanen2016-08-181-9/+15
| |
| * Fix unixy compilation.Jussi Pakkanen2016-08-181-0/+3
| |
| * Generate pdb files during linking.Jussi Pakkanen2016-08-171-0/+11
| |
| * Write pdb info to a specific file.Jussi Pakkanen2016-08-171-0/+9
| |
* | Force clang to error out on unknown arguments. Closes #755.Jussi Pakkanen2016-09-041-0/+6
| |
* | Use context manager for file I/O.Elliott Sales de Andrade2016-08-271-42/+31
| | | | | | | | | | There are a few cases where a context manager cannot be used, such as the logger.
* | Add a new compiler object method: has_members (#723)Nirbheek Chauhan2016-08-271-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | * Add a new compiler object method: has_members Identical to 'cc.has_member', except that this takes multiple members and all of them must exist else it returns false. This is useful when you want to verify that a structure has all of a given set of fields. Individually checking each member is horrifying. * Fix typo in exceptions for has_member(s)
* | Make D compilers return colored output by defaultMatthias Klumpp2016-08-221-0/+18
| |
* | Don't automatically override the -L flag of D compilersMatthias Klumpp2016-08-221-1/+16
| | | | | | | | Works around / resolves #702.
* | Merge pull request #685 from ximion/masterJussi Pakkanen2016-08-211-1/+252
|\ \ | | | | | | Implement D support
| * | interpreter: Rename get_unittest_flag() to unittest_args()Matthias Klumpp2016-08-211-2/+2
| | |
| * | Simplify D compiler argument translationMatthias Klumpp2016-08-211-66/+32
| | |
| * | Allow build definitions to retrieve the unittest flag of a D compilerMatthias Klumpp2016-08-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D allows programmers to define their tests alongside the actual code in a unittest scope[1]. When compiled with a special flag, the compiler will build a binary containing the tests instead of the actual application. This is a strightforward and easy way to run tests and works well with Mesons test() command. Since using just one flag name to enable unittest mode would be too boring, compiler developers invented multiple ones. Adding this helper method makes it easy for people writing Meson build descriptions for D projects to enable unittestmode. [1]: https://dlang.org/spec/unittest.html
| * | Implement D supportMatthias Klumpp2016-08-191-1/+280
| |/ | | | | | | | | | | | | | | | | | | | | This patch adds support for the D programming language[1] to Meson. The following compilers are supported: * LDC * GDC * DMD [1]: http://dlang.org/
* | No fpic on Windows C++. Closes #690.Jussi Pakkanen2016-08-201-0/+5
|/
* compilers: Always return a copy of the exelistNirbheek Chauhan2016-08-121-7/+7
| | | | The consumer might append to it, which will mess up the original object
* Add option for as-needed link option.Jussi Pakkanen2016-08-021-0/+14
|
* Merge pull request #417 from nirbheek/dll-pathsJussi Pakkanen2016-07-131-0/+35
|\ | | | | Fix filenames and paths used in DLL shared library generation
| * Overhaul versioning and naming of librariesNirbheek Chauhan2016-07-011-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains several changes to the naming and versioning of shared and static libraries. The details are documented at: https://github.com/mesonbuild/meson/pull/417 Here's a brief summary: * The results of binary and compiler detection via environment functions are now cached so that they can be called repeatedly without performance penalty. This is necessary because every build.SharedLibrary object has to know whether the compiler is MSVC or not (output filenames depend on that), and so the compiler detection has to be called for each object instantiation. * Linux shared libraries don't always have a library version. Sometimes only soversions are specified (and vice-versa), so support both. * Don't use versioned filenames when generating DLLs, DLLs are never versioned using the suffix in the way that .so libraries are. Hence, they don't use "aliases". Only Linux shared libraries use those. * OS X dylibs do not use filename aliases at all. They only use the soversion in the dylib name (libfoo.X.dylib), and that's it. If there's no soversion specified, the dylib is called libfoo.dylib. Further versioning in dylibs is supposed to be done with the -current_version argument to clang, but this is TBD. https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW23 * Install DLLs into bindir and import libraries into libdir * Static libraries are now always called libfoo.a, even with MSVC * .lib import libraries are always generated when building with MSVC * .dll.a import libraries are always generated when building with MinGW/GCC or MinGW/clang * TODO: Use dlltool if available to generate .dll.a when .lib is generated and vice-versa. * Library and executable suffix/prefixes are now always correctly overriden by the values of the 'name_prefix' and 'name_suffix' keyword arguments.
* | Gcc versions older than 4.9 do not support color output.Jussi Pakkanen2016-07-011-2/+6
| |
* | Enable colored output with GCC. Ninja redirects stdout/stderr so by default ↵Jussi Pakkanen2016-07-011-2/+24
|/ | | | GCC thinks it is not talking to a terminal.