aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cuda.py
AgeCommit message (Collapse)AuthorFilesLines
2023-03-16prevent lib prefix warning from pkg-configCharles Brunet1-1/+1
2023-01-31cuda: enable C++20 for CUDA 12David Seifert1-2/+15
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-compilers
2022-11-30pylint: enable the set_membership pluginDylan Baker1-1/+1
Which adds the `use-set-for-membership` check. It's generally faster in python to use a set with the `in` keyword, because it's a hash check instead of a linear walk, this is especially true with strings, where it's actually O(n^2), one loop over the container, and an inner loop of the strings (as string comparison works by checking that `a[n] == b[n]`, in a loop). Also, I'm tired of complaining about this in reviews, let the tools do it for me :)
2022-10-25Compilers: Keep ccache and exelist separatedXavier Claessens1-2/+2
Only combine them in the Compiler base class, this will make easier to run compiler without ccache.
2022-08-26Fix purely white space issues reported by flake8Alf Henrik Sauge1-9/+9
2022-07-03move various unused typing-only imports into type-checking blocksEli Schwartz1-2/+5
2022-03-22OptionOverrideProxy: Make it immutable to avoid copiesXavier Claessens1-2/+2
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
2022-02-16flake8: fix wrong numbers of blank line separatorsEli Schwartz1-0/+3
2022-01-10compilers: push the compiler id to a class variableDylan Baker1-1/+2
It really is a per class value, and shouldn't be set per instance. It also allows us to get rid of useless constructors, including those breaking mypy
2021-12-30fix type annotations for compiler toolchain rpathsEli Schwartz1-1/+1
We pass around a tuple of rpaths, because rpaths *can* be more than one. But all the annotations said it would be a str instead.
2021-10-27fix various flake8 whitespace errorsEli Schwartz1-7/+7
2021-10-14cuda: Override std=none to avoid host_compiler to emit -std argumentXavier Claessens1-6/+3
2021-10-10Fix typos discovered by codespellChristian Clauss1-2/+2
2021-10-04fix extra whitespaceEli Schwartz1-3/+0
discovered via flake8 --select E303
2021-08-16compilers: Fix extra_args parameterDylan Baker1-2/+2
which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings.
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 Bonzini1-4/+2
The argument is now unused, drop it.
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-1/+1
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.
2021-03-19split program related classes and functions out of dependenciesDylan Baker1-1/+2
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-2/+2
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz1-2/+2
All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
2021-03-04raw string literals are next to godlinessEli Schwartz1-2/+2
Invalid escape sequences are deprecated and will be removed from a future version of python. Use r"" to define them so they remain readable.
2021-02-22[CUDA] Bugfix: Forward sanitizer_*_args() methods to host compiler.Olexa Bilaniuk1-0/+6
Enables -Db_sanitize=undefined and company. Also serves as a testcase for NVCC comma-shielding: Because the test- case declares `b_sanitize=address,undefined`, the host GCC compiler needs `-fsanitize=address,undefined`, but this stands a danger of being split by NVCC when wrapped with `-Xcompiler=args,args`. Special, already-existing comma-shielding codepaths activate to prevent this splitting. Closes #8394.
2021-02-16Add optional -Dcuda_ccbindir= option and -ccbin flag to CUDA compiler.Olexa Bilaniuk1-8/+32
Closes #8110.
2021-02-16Armour-grade quoting to account for NVCC's -Xcompiler peculiarities.Olexa Bilaniuk1-14/+84
2021-02-16Extensive rewrite of GCC/MVSC flag translation to NVCC flags.Olexa Bilaniuk1-31/+313
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+4
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker1-7/+10
2020-11-12compilers: Standardize the names of compiler optionsDylan Baker1-4/+4
Most options don't use language prefaced options (std vs c_std) internally, as we don't need that due to namespacing. Let's do that across the board
2020-10-16compilers/cuda: Use format_map(mapping) instead of format(**mapping)Carlos Bederian1-2/+2
2020-10-16compilers/cuda: Fix has_header_symbol checkCarlos Bederian1-4/+17
2020-10-01compilers/cuda: make type safeDylan Baker1-49/+65
2020-10-01compilres: move depfile_for_object to compilerDylan Baker1-4/+1
2020-10-01compilers: move get_dependency_gen_args to base CompilerDylan Baker1-3/+0
So that every subclass doesn't have to reimplement it. Especially since the Gnu implementation moved out of the CCompiler and into the GnuLikeCompiler mixin
2020-10-01compilers/cpp: Add type annotationsDylan Baker1-1/+1
2020-09-24compilers: put name_string method in base compilerDylan Baker1-3/+0
Every language had the exact same implementation
2020-09-24compilers/compilers: Fully type annotateDylan Baker1-2/+2
2020-07-13Fix native builds on Windows ARM64 machinesNirbheek Chauhan1-3/+0
I made the mistake of always selecting the debug CRT for compiler checks on Windows 4 years ago: https://github.com/mesonbuild/meson/pull/543 https://github.com/mesonbuild/meson/pull/614 The idea was to always build the tests with debugging enabled so that the compiler doesn't optimize the tests away. But we stopped doing that a while ago, and also the debug CRT has no relation to that. We should select the CRT in the same way that we do for building targets: based on the options. On Windows ARM64, the debug CRT for ARM64 isn't always available, and the release CRT is available only after installing the runtime package. Without this, we will always try to pick the debug CRT even when --buildtype=debugoptimized or release.
2020-05-16Let .pc files specify rpath.Dan Kegel1-3/+4
Fixes #4027
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-8/+8
2019-12-12compilers: Make get_display_language a class or static methodDylan Baker1-3/+0
Currently this is done at the instance level, but we need it at the class level to allow compiler "lang" args to be gotten early enough. This patch also removes a couple of instance of branch/leaf classes providing their own implementation that is identical to the Compiler version.
2019-12-12compilers: move language attribute to the class levelDylan Baker1-2/+1
We know that if a compiler class inherits CCompiler it's language will be C, so doing this at the class level makes more sense.
2019-11-18Use strict function prototypesMichael Hirsch, Ph.D1-1/+1
2019-11-06Fix typos found by codespellWolfgang Stöggl1-2/+2
- Typos were found by codespell v1.16.0
2019-11-05dependency('cuda')Aleksey Gurtovoy1-1/+4