aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)AuthorFilesLines
2021-08-16compilers/compilers: Fix some potential issues spotted by pyrightDylan Baker1-2/+4
There are two changes here, one is to remove an `elif` that is effectively an `else`, that helps the type checker and provides a small speedup potentially. The second is a potentially unbound variable, that currently isn't hit, but very much could be.
2021-08-16compilers: Fix extra_args parameterDylan Baker6-31/+36
which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings.
2021-08-16compilers: Fix annotations for run and cached_compileDylan Baker2-6/+6
Which absolutely should accept `str | File`, but the annotations claim that only strings are accepted.
2021-08-15Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"Jussi Pakkanen1-11/+0
This reverts commit 0b97d585480e973d8b149618901f7a4ddfa1a906.
2021-08-11compilers/c++: Add MSVC option to make the __cplusplus define accurateDylan Baker1-0/+11
Otherwise it always returns the value for c++98, starting with MSVC 2017 15.7 or later. Earlier versions are not affected by this mis-feature
2021-08-08Add support for finding Javascript source libraries with Emscripten.Jussi Pakkanen2-1/+36
2021-07-25C2000 compiler also accepts *.cla filesmiebka1-2/+4
2021-07-18Cuda: Enable PGODavid Seifert1-0/+6
2021-07-18Cuda: Filter -isystem with system pathsDavid Seifert1-12/+19
2021-07-18Cuda: Pass -DNDEBUG throughDavid Seifert1-0/+3
2021-07-14linkers: remove is_shared_module argument to get_soname_argsPaolo Bonzini4-12/+7
The argument is now unused, drop it.
2021-07-13Clang: Apply `-O0`Pamplemousse1-1/+1
Fix #8986
2021-07-06Fix unsupported linker error messageAndrea Pappacoda1-1/+1
An `f` was dropped in bd6f46e723813dfadaba1f7c87d3b0b751d05219
2021-07-05condense linesEli Schwartz3-10/+5
2021-07-05simplify mesonlib imports for the sake of line lengthsEli Schwartz1-7/+7
2021-07-05more f-strings too complex to be caught by pyupgradeEli Schwartz5-16/+14
2021-07-01C2000: linker uses now binary setting defined within the cross-filemiebka1-1/+1
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger9-10/+10
2021-06-27Update detect.pyIan Harvey1-1/+1
Adjust Intel Fortran compiler detection to handle changes in ifort logo with the introduction of the oneapi toolkit. See #8338.
2021-06-25typing: Annotate compilers.detectDaniel Mensinger1-62/+73
2021-06-25Split compiler detection from EnvironmentDaniel Mensinger3-4/+1243
This moves all the compiler detection logic into the new compilers.detect module. This dramatically reduces the size and complexity of Environment.
2021-06-22Fixed style issue as per comments on PR 8911.Justin Handville1-2/+1
2021-06-22Fix for Issue 8910 (Meson filters CMake asm files)Justin Handville1-0/+3
2021-06-18holders: Introduce HoldableObjectDaniel Mensinger1-3/+4
2021-06-18interpreter: Refactor interpreter.compiler to use ObjectHolderDaniel Mensinger1-0/+2
2021-06-09compilers: Fix missing functions in Compiler base classDaniel Mensinger3-5/+19
2021-06-07upgrade percent formatted strings pyupgrade did not catchEli Schwartz2-16/+14
2021-06-07condense linesEli Schwartz1-8/+4
2021-06-07more f-strings everywhereEli Schwartz1-73/+57
pyupgrade didn't catch many .format() methods which were too complex (e.g. multiline or applied to templates rather than string literals)
2021-06-07cython: Add an option for selecting python 3 vs python 2 outputDylan Baker1-3/+21
2021-06-07compilers: Add cython file suffixesDylan Baker1-0/+2
2021-06-07compilers: Expose Cython compilerDylan Baker1-0/+2
2021-06-07hack: compilers/cython: hardcode python 3 not 2Dylan Baker1-1/+2
2021-06-07compilers: Add a cython CompilerDylan Baker1-0/+60
2021-06-05typing: Fully annotate dependencies.cudaDaniel Mensinger1-0/+2
2021-06-02use an immutable list for an lru_cached functionsDylan Baker3-4/+7
When mutable items are stored in an lru cache, changing the returned items changes the cached items as well. Therefore we want to ensure that we're not mutating them. Using the ImmutableListProtocol allows mypy to find mutations and reject them. This doesn't solve the problem of mutable values inside the values, so you could have to do things like: ```python ImmutableListProtocol[ImmutableListProtocol[str]] ``` or equally hacky. It can also be used for input types and acts a bit like C's const: ```python def foo(arg: ImmutableListProtocol[str]) -> T.List[str]: arg[1] = 'foo' # works while running, but mypy errors ```
2021-05-19compilers: Add `get_debug_args` to base CompilerDylan Baker1-0/+4
This was missed, there should be an implementation in the base Compiler class, if for nothing else to help mypy
2021-05-19rust: override get_linker_always_argsDylan Baker1-0/+6
instead of opencoding what should be there in the rust compile rule
2021-05-19.C files are now treated as C++ codeVolker-Weissmann1-2/+4
2021-05-15Visual Studio Address Sanitizer updatesPeter Harris1-1/+1
* Allow address sanitizer for Visual Studio 2019 version 16.9 Address Sanitizer was first supported with the current syntax in Visual Studio 16.9.0 (cl version 19.28.29910). * VS: Convert /fsanitize=address to project file setting
2021-05-15Add gnuXX stds to Objective C.Jussi Pakkanen1-1/+1
2021-05-11Make objective C use C standard version. Closes #5495.Jussi Pakkanen2-2/+39
2021-05-10deactivate intrinsic functions if no optimizations are requestedAlexander Neumann1-1/+1
2021-05-02Clean up unused importsRalf Gommers2-4/+2
2021-05-02Use sanity_check_impl for objc/objppRalf Gommers3-48/+5
This gets rid of compile warnings, and simplifies the code. Note that `work_dir` in sanity_check_impl was incorrect, it was used both to prepend to file names and as cwd=work_dir argument to Popen. This is fixed here. Closes gh-7344
2021-04-01environment: get environment variables for both host and build machinesDylan Baker1-8/+15
Fixes #8605
2021-03-30Split environment variable and command line cflagsDylan Baker1-4/+7
They are supposed to have different behavior. The environment variables apply to both the compiler and linker when the compiler acts as a linker, but the command line ones do not. Fixes #8345
2021-03-28Strip host-compiler -std flag from NVCC line.cudafix0572Olexa Bilaniuk1-1/+12
Closes #8523.
2021-03-28Retract "DQSQ" merging in NVCC arguments handling.Olexa Bilaniuk1-15/+0
No coverage, no tests, unreadable, unused, likely premature optimization.
2021-03-28Canonicalize and merge consecutive -Xcompiler flags together.Olexa Bilaniuk1-1/+47
Makes command-line more readable.