summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
...
* GnuCPPCompiler: allow usage of GNU extensions (#619)Zhe Wang2016-06-271-1/+2
| | | | | | * GnuCPPCompiler: allow usage of GNU extensions * Add myself to authors.txt
* Don't pass pdb flags while linking inside compiler tests (#614)Nirbheek Chauhan2016-06-241-7/+22
| | | | | | | | | | | | This causes intermittent build failures in the MSVC CI because of a race with the default anti-virus that ships with Windows while writing the .pdb file: https://ci.appveyor.com/project/jpakkane/meson/build/1.0.58 There's a separate fix for that in the works that will fix this in the general case, but for compiler tests we don't need to generate the pdb file at all. So, just fetch the CRT flag (/MDd) if needed instead. This has the side-effect of making compiler tests that use self.links and self.run faster.
* Thank you ever so much Git.Jussi Pakkanen2016-06-241-1/+1
|
* Added minsize build type that optimizes for binary size.Jussi Pakkanen2016-06-231-8/+23
|
* Print full mesonlog on failed tests when run under CI.Jussi Pakkanen2016-06-231-6/+11
|
* compilers: Copy extra_args whenever we modify itNirbheek Chauhan2016-06-211-11/+13
| | | | Otherwise the changes ripple upstream and modify extra_args in the callee
* Do not use [] as a function default argument as the variable persists over ↵Jussi Pakkanen2016-06-211-12/+36
| | | | multiple invocations.
* find_library: Also accept extra_dirs as a single string argumentNirbheek Chauhan2016-06-211-0/+2
|
* Use cross-info c_args, c_link_args, etc for all compiler checksNirbheek Chauhan2016-06-151-53/+63
| | | | | | | | | | | | This allows the user to specify custom arguments to the compiler to be used while performing cross-compiler checks. For example, passing a GCC specs file as c_link_args so that a "prefix" filled with libraries that are to be compiled against can be found with cc.find_library, or an `-mcpu` c_arg that is required for compilation. Also ensure that unix_link_flags_to_native() and unix_compile_flags_to_native() always return a copy of the original arguments and not a reference to the original arguments. We never want to modify the original arguments.
* compilers: Fix usage of cross tools args in sanity checksNirbheek Chauhan2016-06-151-4/+4
| | | | | The cross-extra-flags were being overwritten and ignored. Also, we don't link while doing a cross-compiled sanity check even with ObjC++
* compiler: Use cross tools args in sanity check.Martin Hostettler2016-06-131-18/+50
|
* Add special casing for VS which ignores unknown arguments.Jussi Pakkanen2016-06-111-0/+21
|
* Added functionality to pick the first supported argument from a list. Closes ↵Jussi Pakkanen2016-06-091-2/+2
| | | | #583.
* Add a has_arg method to compiler to check whether it supports a given argument.Jussi Pakkanen2016-06-091-0/+8
|
* compilers: Add the buildtype args for checks that perform linking (#543)Nirbheek Chauhan2016-05-301-1/+8
| | | | | This is required for checking for compiler checks that involve linking to a static library with MSVC. Without this, MSVC errors out since no CRT is specified.
* Can haz next revision of C++ standard.Jussi Pakkanen2016-05-301-2/+2
|
* Pch disabling works now.Jussi Pakkanen2016-05-301-1/+1
|
* set working dir for sanity check compilationNicolas Schneider2016-05-261-1/+1
|
* compilers: Fix header stub change that broke has_function checks on Windows ↵Nirbheek Chauhan2016-05-261-1/+2
| | | | | | | (#559) Fixes https://github.com/mesonbuild/meson/issues/558
* Merge pull request #542 from mesonbuild/ownstdlibJussi Pakkanen2016-05-251-0/+6
|\ | | | | Build transparently with a custom standard library
| * Can specify a stdlib subproject that is used implicitly on all targets with ↵Jussi Pakkanen2016-05-211-0/+6
| | | | | | | | said language.
* | Merge pull request #540 from centricular/sanity_check_msvc_fixJussi Pakkanen2016-05-251-91/+28
|\ \ | | | | | | Fix the MSVC sanity check to use the generic C/C++ sanity check
| * | compilers: Remove duplication in sanity check implementationsNirbheek Chauhan2016-05-221-90/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate the C/C++ compiler sanity checks since the test code is almost exactly the same, and then use that for the MSVC C/C++ compilers as well. All these sanity checks had diverged because of the code duplication. This also fixes an intermittent sanity check failure that I was seeing with MSVC. Note: The ObjC/C++ compilers can also probably use the same implementation.
| * | compilers: Remove spurious wait while running sanity checkNirbheek Chauhan2016-05-181-1/+0
| | | | | | | | | | | | Popen.communicate() already waits for the process to complete.
* | | Merge pull request #547 from centricular/limits-h_needed_for_stubsJussi Pakkanen2016-05-251-0/+3
|\ \ \ | | | | | | | | compilers: Always include limits.h to make the stub machinery work
| * | | compilers: Always include limits.h to make the stub machinery workNirbheek Chauhan2016-05-241-0/+3
| |/ / | | | | | | | | | | | | | | | | | | limits.h is a requirement of the C language and is available with all compilers and platforms from the last two decades. If limits.h is not available, the compiler only supports an ancient dialect of C and lots of other things will break too.
* | | Option for GCC STL debug mode.Jussi Pakkanen2016-05-211-1/+6
|/ /
* | cc.has_function: Don't forget to check for stubs in the fallback testNirbheek Chauhan2016-05-161-3/+5
| | | | | | | | | | | | The fallback test was making the stub check on Linux/glibc completely useless. Fixes #535
* | has_function: Also detect function implementations inside headersNirbheek Chauhan2016-05-041-2/+14
| | | | | | | | | | | | This also detects when the header has re-defined the symbol to something else that is then provided by libc, which is also a case we want to support.
* | compilers: Remove outdated MSVC implementation of cc.find_libraryNirbheek Chauhan2016-04-191-13/+0
| | | | | | | | | | | | With the change to cc.links to translate unix link flags, this is no longer needed and is wrong because it hasn't kept-up with the improved default cc.find_library implementation.
* | compilers: Convert args to cc.{links,run} from unix to nativeNirbheek Chauhan2016-04-191-2/+3
| | | | | | | | | | This allows build files to pass -L and -l flags and have them converted automatically as needed.
* | Fix symbol-exists check for cross_sizeof and add the same check to ↵Nirbheek Chauhan2016-04-151-1/+9
| | | | | | | | | | | | | | cross_alignment The previous check was failing while checking pointer sizes such as void* due to a syntax error.
* | Fix off-by-one in cross_sizeof and cross_alignment on MSVCNirbheek Chauhan2016-04-151-0/+8
|/
* compilers: Fix cross_sizeof when the type doesn't exist (#514)Nirbheek Chauhan2016-04-141-1/+11
| | | compilers: Fix cross_sizeof when the type doesn't exist
* Merge pull request #490 from centricular/has_function_linkJussi Pakkanen2016-04-131-10/+61
|\ | | | | Use the linker to check if a specific function is provided by the toolchain or runtime
| * compilers: Use compiler-specific no-optimization flagsNirbheek Chauhan2016-04-111-2/+10
| | | | | | | | MSVC doesn't understand -O0. It uses -Od (or /Od) instead.
| * compilers: Also support built-in functions in cc.has_functionNirbheek Chauhan2016-04-071-1/+8
| |
| * Improve cc.has_function() check to not require any includes and detect stubsTim-Philipp Müller2016-04-071-10/+36
| | | | | | | | | | | | | | | | | | | | | | We now use .links() to detect if a C compiler function is available or not, that way the user doesn't need to specify all the possible includes for the check, which simplifies things considerably. Also detect glibc stub functions that will never work and return false for them. Closes #437
| * New API: cc.has_header_symbol to check if a header defines a specific symbolNirbheek Chauhan2016-04-071-0/+10
| | | | | | | | | | Also supports a 'prefix' keyword argument for feature checks such as _GNU_SOURCE or for headers that need to be included first
* | compilers: Debug optimization level should be -O0 (#509)Nirbheek Chauhan2016-04-071-1/+3
|/ | | | | | | | | | | | | | | | | Without any -O options, gcc does not generate properly debuggable code. > With no -O option at all, some compiler passes that collect information useful > for debugging do not run at all gcc recommends -Og, but that isn't supported by clang, so we use -O0 See https://github.com/mesonbuild/meson/pull/509 for more discussion
* Merge pull request #438 from trhd/testing_optionsJussi Pakkanen2016-04-061-1/+1
|\ | | | | New options for controlling test output.
| * Move MesonException from coredata to mesonlib.Hemmo Nieminen2016-04-011-1/+1
| |
* | Bring back the old manual search to cc.find_library.Jussi Pakkanen2016-04-041-6/+31
| |
* | Merge pull request #390 from nirbheek/msvc-module-defsJussi Pakkanen2016-04-031-0/+7
|\ \ | | | | | | Add support for passing a module definitions file for exporting symbols while linking
| * | Add shared_library argument for a Visual Studio module definitions fileNirbheek Chauhan2016-03-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On MSVC, shared libraries only export symbols that have been explicitly exported either as part of the symbol prototype or via a module definitions file. On compilers other than MSVC, all symbols are exported in the shared library by default and the format for the list of symbols to export is different, so this is only used with the VisualStudio compiler. The module defs file path can either be relative to the current source directory or an absolute path using meson.source_root() + '/some/path'
* | | Whitespace fixing.Jussi Pakkanen2016-04-031-1/+0
| | |
* | | Put buildtype flags to vala compiles.Jussi Pakkanen2016-04-031-1/+6
| | |
* | | Add coverage option to compilers.Jussi Pakkanen2016-04-021-8/+8
| |/ |/|
* | Merge pull request #478 from centricular/sizeof_no_symbolJussi Pakkanen2016-03-281-1/+1
|\ \ | |/ |/| Return -1 from cc.sizeof if the symbol could not be found
| * compilers: Return -1 from cc.sizeof if the symbol could not be foundNirbheek Chauhan2016-03-281-1/+1
| | | | | | | | | | Allows people to avoid adding a separate check for the symbol existing in case it's platform-specific