aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)AuthorFilesLines
2019-09-26Q&D experiment to scan and build C++ modules with VS.vsmodtestJussi Pakkanen1-1/+1
2019-09-24CUDA support on WindowsAleksey Gurtovoy3-20/+118
2019-09-23mesonbuild: fix exception name.Jehan1-1/+1
CrossNoRunException is in compilers module, not mesonlib.
2019-09-09the solaris linker also needs start/end-group for circular linkingDylan Baker1-2/+2
2019-09-08fix objc freestanding sanitycheckNguyen, Giang (G. Yakiro)1-1/+1
2019-09-05Merge pull request #5823 from scivision/linker-pgi-linuxJussi Pakkanen1-1/+5
PGI compiler fixes
2019-09-05mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy2-9/+8
2019-09-05PGI cannot accept -pthreadMichael Hirsch, Ph.D1-0/+4
2019-09-05PGI: use ar link wrapper on WindowsMichael Hirsch, Ph.D1-1/+1
2019-09-05Create CUDA linker with CUDA compilerKramer Peace1-6/+2
Since they are laways paired there is no need to "search" for the cuda linker.
2019-09-05Add a CUDA linker objectKramer Peace1-1/+5
Fixes issue #5870
2019-08-30compilers: Move the compiler argument to proxy linker flags to the compiler ↵Dylan Baker6-11/+26
class Instead of the DynamicLinker returning a hardcoded value like `-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be something '-Xlinker=' This makes a few things cleaner, and will make it possible to fix using clang (not clang-cl) on windows, where it invokes either link.exe or lld-link.exe instead of a gnu-ld compatible linker.
2019-08-28Fix gcc include dotDylan Baker1-0/+2
2019-08-20Merge pull request #5681 from dcbaker/dynamic-linker-splitJussi Pakkanen21-835/+533
split dynamic linker representations from compilers
2019-08-20Fix CCRX linking external dependenciesPhillip Cao1-0/+2
2019-08-17Pass optimization flags to rustc properly. Closes: #5788.Jussi Pakkanen1-5/+5
2019-08-14compilers: Dispatch to dynamic linker classDylan Baker18-686/+273
Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
2019-08-14compilers/mixins: Add a module for mixins for compilers that are linkersDylan Baker1-0/+124
This is currently meant to solve problems for D's DMD compiler, however it may be useful in other cases.
2019-08-14compilers/rust: Proxy extra kwargs to Compiler.__init__Dylan Baker1-2/+2
2019-08-14compilers: Make MSVClike compilers proxy extra keyword argumentsDylan Baker2-12/+12
2019-08-14compilers/fortran: Make ifort (windows) proxy extra args to CompilerDylan Baker1-2/+2
2019-08-14compilers/cuda: pass through extra kwargsDylan Baker1-2/+2
2019-08-14compilers/swift: Pass extra args to the Compiler constructorDylan Baker1-2/+2
2019-08-14compilers/fortran: fix ifort (linux, mac) dependency generationDylan Baker1-1/+7
Ifort can generate dependency information (.d files), it just does it differently than GNU compilers do. This also fixes a bug caused by adding the dependency generation commands to the GNULike class later in this series.
2019-08-14compilers/objc[pp]: Pass extra keyword arguments to Compiler constructorDylan Baker2-12/+12
2019-08-14compilers/cuda: don't use re for replacementDylan Baker1-3/+2
Even with the check (for extra safety) string.replace is more than twice as fast.
2019-08-14compilers/mixins/pgi: simplify pic logicMichael Hirsch, Ph.D1-3/+3
2019-08-14re-architect the D compiler abstractionsDylan Baker1-215/+197
We support 3 D compilers, DMD, LDC, and GDC. DMD is the reference compiler, and LDC attempts to largely mirror it's command line usage. GDC does not, it instead acts like GCC (which makes sense). The current abstraction puts DMD behavior in the base D compiler and then overrides then in the GnuDCompiler class. This is messy, but it becomes more problematic when splitting the linker and compiler abstractions apart. I've opted to instead split the DCompiler class into two separate classes. The DCompiler implements core D functinoality, and DmdLikeCompilerMixin, which implements the DMD and LDC command line arguments. I've then mxed that into the DmdDCompiler and LLVMDCompiler classes, and mixed the GnuCompiler into the GnuDCompiler class to get Gnu command line behavior.
2019-08-05Add basic Webassembly support via Emscripten.Jussi Pakkanen4-1/+62
2019-08-04Fix cross compilation on OSXXavier Claessens1-2/+6
Do not set -Wl,-headerpad_max_install_names when compiling on OSX for another platform. It causes linker issues.
2019-08-02Make ARM compilers work on Linux.Jussi Pakkanen1-2/+2
2019-07-30default libtype to static to allow windows compilers to not skipMichael Hirsch, Ph.D1-3/+5
To make Fortran tests useful on Windows, the library_type should default to static, unless needed to specifically test shared. Shared Fortran libs on Windows for non-Gfortran compilers is fragile requiring proprietary code syntax.
2019-07-30no special shared lib args for PGIMichael Hirsch, Ph.D2-7/+10
2019-07-30PGI -shared is for Linux onlyMichael Hirsch, Ph.D1-1/+8
2019-07-30Merge pull request #5740 from scivision/intel-ci_fixJussi Pakkanen1-2/+1
tests: Intel-cl fixes for Fortran
2019-07-30PGI: cpp_pch precompiled headers functionalityMichael Hirsch, Ph.D2-2/+17
* PGI C++ PCH enable PGI compilers support precompiled headers for C++ only. The common/13 pch test passes if run manually with no spaces in the build path. However, since Meson run_project_tests.py makes temporary build directories with spaces in each tests, PGI --pch_dir can't handle this and fails. So we skip the test for PGI despite it working for usual case with no-spaces in build dir. Note: it's fine to have spaces in full path for sourcedir, just no spaces in relative path to builddir. * doc
2019-07-30intel-cl: readd missing importMichael Hirsch, Ph.D1-2/+1
2019-07-29Flang: add links for non-flang main programMichael Hirsch, Ph.D1-0/+3
2019-07-23compilers: pull sanitzier args into compiler classesDylan Baker3-18/+21
This simplifies and cleans things up.
2019-07-23compilers: return as-needed args as a listDylan Baker2-4/+4
2019-07-23compilers: Move lto args into compiler classDylan Baker2-5/+15
There are two problems, one is that it assumes -flto is the argument to do LTO/WPO, which isn't true of ICC and MSVC (and presumably) others. It's also incorrect because it assumes that the compiler and linker will always be the same, which isn't necessarily true. You could combine GCC with Apple's linker, or clang with link.exe, which use different arguments.
2019-07-20Add optional progress bar when generating build.ninjaNirbheek Chauhan1-3/+3
2019-07-20ValaCompiler: only emit '--debug' in debug build.Jeremy Philippe1-1/+1
2019-07-18fix all flake8 issuesDaniel Mensinger1-4/+3
2019-07-16Fix missing return statements that are seen with -Werror=return-type.Martin Liska2-0/+5
Error example: Code: #include <locale.h> int main () { /* If it's not defined as a macro, try to use as a symbol */ #ifndef LC_MESSAGES LC_MESSAGES; #endif } Compiler stdout: Compiler stderr: In file included from /usr/include/locale.h:25, from /tmp/tmpep_i4iwg/testfile.c:2: /usr/include/features.h:382:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] 382 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ /tmp/tmpep_i4iwg/testfile.c: In function 'main': /tmp/tmpep_i4iwg/testfile.c:8:9: error: control reaches end of non-void function [-Werror=return-type] 8 | } | ^ cc1: some warnings being treated as errors
2019-07-15compilers/mixins/pgi: Finish type annoationsDylan Baker1-21/+27
2019-07-15compilers: split pgi compiler out of compilers moduleDylan Baker5-72/+92
2019-07-15compilers/mixins/elbrus: add type annotations and fix typesDylan Baker4-18/+23
There is a pretty big error in here, trying to return a tuple comperhension: (a for a in []) is not a tuple, it's a generator. This has profound type annotations: generators don't support most tuple or list methods, and they can only be iterated once. Beyond that tuples are meant for heterogenous types, ie, position matters for types. I've converted the output to a list in all cases.
2019-07-15compilers: put elbrus in mixinsDylan Baker5-43/+62
2019-07-15compilers/mixins/clang: Add type annotationsDylan Baker1-12/+21