aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)AuthorFilesLines
2018-02-25Use include_directories for D impdirs.dimpdirJussi Pakkanen1-3/+11
Change the code to store D properties as plain data. Only convert them to compiler flags in the backend. This also means we can fully parse D arguments without needing to know the compiler being used.
2018-02-25Hide banner when invoking csc.Jussi Pakkanen1-1/+7
2018-02-25Add support for Visual Studio csc c# compilerThibault Saunier2-7/+34
2018-02-20d: gdc: Implement proper dependency gen supportMatthias Klumpp1-3/+10
Older versions of GDC had broken support for the -MQ flag (resulting in a compiler error). New versions of GDC have this issue fixed (some older versions received a backport). Starting with GCC 7.1 we can assume dependency generation to always work reliably.
2018-02-20pkgconfig deps: Warn when a static library isn't foundNirbheek Chauhan1-1/+4
A hard error makes this feature useless in most cases since a static library usually won't be found for every library, particularly system libraries like -lm. Instead, warn so the user can provide the static library if they wish. This feature will be expanded and made more extensible and more usable in the future. Closes https://github.com/mesonbuild/meson/issues/2785
2018-02-11Enable default linker optimisations in MSVC release and minsize buildsLeon Krause1-2/+5
2018-02-08Don't use --export-dynamic on CygwinJon Turney1-1/+1
After PR #2662, running test case common/125 shared module/ on Cygwin gets me: $ ninja -C _build ninja: Entering directory `_build' [7/7] Linking target prog.exe. /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols? Also, fix doc for correct version of first apperance. Future work: Notwithstanding the hint that ld gives, these options are not equivalent, and it's not clear we should be using it here: --export-all-symbols is the default behaviour, and if the exports are restricted by explicit annotations or a .def file, this option might be overriding that...
2018-02-04Merge pull request #2938 from acfoltzer/rust-cross-mergeJussi Pakkanen1-2/+13
Add cross-compilation support for `rustc`
2018-01-29Add cross-compilation support for `rustc`Adam C. Foltzer1-2/+13
This patch is largely modeled on the relatively-straightforward code for Fortran cross-compilation, so there might be some intricacies missing.
2018-01-30Use os.path: basename() and dirname() instead of split()Aleksey Filippov4-11/+11
According to Python documentation[1] dirname and basename are defined as follows: os.path.dirname() = os.path.split()[0] os.path.basename() = os.path.split()[1] For the purpose of better readability split() is replaced by appropriate function if only one part of returned tuple is used. [1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-30Print warning when linker arguments are passed to has_argumentTing-Wei Lan2-0/+15
has_argument and other similar methods of compiler objects only support checking compiler flags. If they are used to check linker flags, the results are very likely to be wrong and developers should be warned.
2018-01-09Merge pull request #2803 from dcbaker/wip/freebsd-fixesJussi Pakkanen1-1/+9
various BSD fixes
2018-01-09Add `export_dynamic` argument to `executable`. (#2662)Nikita Churaev1-0/+8
2018-01-06tests: fix rpath_uses_ORIGIN on dragonflybsdDylan Baker1-0/+5
Which always seems to prepend /usr/lib/gcc50 (or whatever version) to the rpath, and $ORIGIN after that.
2018-01-06compilers: fix unittest "16 prebuilt shared" on dragonfly bsdDylan Baker1-1/+4
2017-12-30add Compiler.thread_flags() stubAlexey Stukalov1-0/+3
fixes #2834
2017-12-30compilers: prefer C++ over objc in clink_langsNirbheek Chauhan1-1/+1
Otherwise we will try to use the objc compiler when linking projects with both objc and C++. Technically we should use the objc++ linker when doing this, but on most (all?) systems the objc++ linker is `c++`, which is the same as the C++ linker. Closes https://github.com/mesonbuild/meson/issues/2468
2017-12-23Add whitespace around '+'.Benjamin Redelings1-1/+1
2017-12-23Fix linking with clang++ on linux if install_rpath.Benjamin Redelings1-1/+6
2017-12-20Merge pull request #2791 from behlec/compiler-versionJussi Pakkanen6-45/+49
Add more version information to compiler
2017-12-19Fix: More information for C compilers.Christoph Behle1-2/+2
Add full version to gnu and icc C compiler.
2017-12-18Use -MD instead of -MMD for reliability.Jussi Pakkanen2-2/+2
2017-12-17Allow value 'if-release' for b_ndebug project option. (#1896)Hemmo Nieminen1-4/+3
When set, NDEBUG will be automatically defined for for release builds but not for other build types.
2017-12-16More version information for Fortran.Christoph Behle1-18/+18
2017-12-16More version information for DChristoph Behle1-8/+8
2017-12-16More version information for C#Christoph Behle1-2/+2
2017-12-16More version information for compilers.Christoph Behle3-15/+19
See issue #2762 Adds full_version to class Compiler. If set full_version will be printed additionally. Added support for CCompiler and CPPCompiler Added support for gcc/g++, clang/clang++, icc.
2017-12-13Use LC_ALL=C in CCompiler.get_library_dirsIsmael González1-1/+3
Use LC_ALL=C in CCompiler.get_library_dirs to fix wrong results with non English locales.
2017-12-11Fix Vala thread flag breakage (#2756)Ernestas Kulik1-2/+2
2017-12-07haiku: do not add pthread argumentsDylan Baker1-8/+14
Haiku has pthreads, but they are part of the standard C library, and do not need either special compiler or linker flags.
2017-12-07Renamed UserStringArrayOption to UserArrayOption for short.Jussi Pakkanen2-9/+9
2017-12-06Add C++17 flags to GCC and Clang.Jussi Pakkanen1-4/+4
2017-12-03find_library: Prefer .dll.a and .lib over .dll for sharedNirbheek Chauhan1-1/+3
We can't know if the .lib is a static or import library, but that's a problem in general too. The only way to figure out if a specific file is an import or a static library is to dump its symbols and check if it starts with __imp or not. Even then, some libs are hybrid import and static, i.e., they contain references to DLLs for some symbols and also provide implementations for other symbols so this is a difficult problem. Closes https://github.com/mesonbuild/meson/issues/2659
2017-12-03Merge pull request #2618 from mesonbuild/osxlinkerfixesJussi Pakkanen2-1/+24
Fix many things have have been slightly broken in OSX
2017-12-03vala: add stubs for thread flag methodsErnestas Kulik1-0/+6
As the Vala compiler does not define thread_flags() and thread_link_flags(), depending on threads in any capacity will cause Meson to fail. Fixes #2720.
2017-11-29adding C++98 to versions that meson can supportSolomon Choina1-2/+2
2017-11-26Use absolute paths for rpaths on OSX.Jussi Pakkanen2-1/+17
2017-11-26Add headerpad linker argument on OSX.Jussi Pakkanen1-0/+7
2017-11-26spelling: overriddenJosh Soref1-2/+2
2017-11-26spelling: occurrenceJosh Soref1-6/+6
2017-11-15Merge pull request #2611 from mesonbuild/nirbheek/pkgconfig-msvc-staticJussi Pakkanen1-10/+49
Several fixes to pkg-config dependencies and the pkg-config module (try 3)
2017-11-14Fix #2620rkfg1-1/+3
2017-11-11compilers: Improve manual library searchingNirbheek Chauhan1-10/+49
We can now specify the library type we want to search for, and whether we want to prefer static libraries over shared ones or the other way around. This functionality is not exposed to build files yet.
2017-11-09Better check for when address sanitizer is enabled. Closes #2590.Jussi Pakkanen1-1/+1
2017-11-02Warn when no inc dir is found from parsing GNU compiler outputAlexis Jeandet1-1/+4
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-11-01Fix detection of include dirs with gnu compiler and non C localeAlexis Jeandet1-1/+4
Auto detection was based on parsing gcc's output so we have to ensure that it is always 'C'. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-01C/C++: Get default include dirs from compilersNiklas Claesson2-0/+47
2017-10-01VisualC: Add support for msvc toolset versionNiklas Claesson1-0/+26
2017-09-26Linker flag for Windows GUI applications was missing on MSVC.Jussi Pakkanen1-0/+3
2017-09-22Merge pull request #2187 from centricular/fix-pcap-dependencyJussi Pakkanen1-0/+28
Fix pcap dependency, str.strip() now takes an argument, add cc.get_return_value()