summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove incorrect arguments for C2000 C++ compiler. Add correct form for ↵Nathanael Gray2021-11-141-12/+13
| | | | output and include args.
* various manual conversion of percent-formatted strings to f-stringsEli Schwartz2021-11-011-2/+2
|
* fix various flake8 whitespace errorsEli Schwartz2021-10-271-2/+2
|
* Add stdc++20 support for Visual Studio 2019 v16.11Moroz Oleg2021-10-241-0/+4
| | | | fix #9242
* Fix typos discovered by codespellChristian Clauss2021-10-101-3/+3
|
* fix extra whitespaceEli Schwartz2021-10-041-1/+0
| | | | discovered via flake8 --select E303
* compilers/elbrus: Deal with C/C++/Fortran stds more correctlymakise-homura2021-09-291-8/+13
|
* compilers/elbrus: Fix incorrect inheritance model of Elbrus*Compilermakise-homura2021-09-291-4/+3
|
* compilers: Add default search path stdlib_only_link_flagsDylan Baker2021-09-251-5/+32
| | | | | | | | | This should be done in all cases of language_stdlib_only_link_flags, but I don't have access to all of the compilers to test it. This is required in cases where object files created by gfortran are linked using another compiler with a differen default search path, such as gfortran and clang together.
* pylint: check for duplicate importsDylan Baker2021-09-241-1/+1
| | | | | | I ran into one of these from LGTM, and it would be nice if pylint could warn me as part of my local development process instead of waiting for the CI to tell me.
* pylint: turn on superflous-parensDylan Baker2021-08-311-2/+2
| | | | | | | | We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
* compilers: Fix extra_args parameterDylan Baker2021-08-161-1/+1
| | | | | which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings.
* Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"Jussi Pakkanen2021-08-151-11/+0
| | | | This reverts commit 0b97d585480e973d8b149618901f7a4ddfa1a906.
* compilers/c++: Add MSVC option to make the __cplusplus define accurateDylan Baker2021-08-111-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
* more f-strings too complex to be caught by pyupgradeEli Schwartz2021-07-051-4/+3
|
* split program related classes and functions out of dependenciesDylan Baker2021-03-191-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.
* Add address sanitizer support for Visual Studio.Jussi Pakkanen2021-03-091-1/+0
|
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-5/+5
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* move handling of CFLAGS and friends to environmentDylan Baker2021-01-111-2/+1
| | | | | | This has a bunch of nice features. It obviously centralizes everything, which is nice. It also means that env is only re-read at `meson --wipe`, not `meson --reconfigure`. And it's going to allow more cleanups.
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-1/+1
| | | | | | | | I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
* move OptionKey to mesonlibDylan Baker2021-01-041-3/+1
| | | | | There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
* use OptionKey for compiler_optionsDylan Baker2021-01-041-88/+114
|
* Add choices to OptionProxyDylan Baker2021-01-041-8/+8
| | | | they're probably not strictly needed, but it makes mypy happy.
* compilers: add support for c++20/gnu++20Florian Schmaus2020-12-101-4/+7
| | | | Fixes #8084.
* compilers: define standards in the base language compilerDylan Baker2020-11-121-45/+29
| | | | | | And then update the choices in each leaf class. This way we don't end up with another case where we implicitly allow an invalid standard to be set on a compiler that doesn't have a 'std' setting currently.
* compilers: Standardize the names of compiler optionsDylan Baker2020-11-121-3/+3
| | | | | | 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
* compilers: Enable C++20 for Intel C++ Compiler.Vinson Lee2020-10-061-0/+3
| | | | | | | | Intel C++ Compiler 19.1 has C++20 features. https://software.intel.com/content/www/us/en/develop/articles/intel-c-compiler-191-for-linux-release-notes-for-intel-parallel-studio-xe-2020.html Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* compilers/icl fix IntelClCPP argument checkingDylan Baker2020-10-011-0/+4
| | | | | Unlike MSVC and ClangCl it needs to call into it's own compiler check args
* compilers: move get_compile_check_args() to CompilerDylan Baker2020-10-011-7/+8
| | | | | This is groundwork to put _build_wrapper in the base Compiler, which is needed to make the D compilers truly type safe.
* compilers/cpp: Add type annotationsDylan Baker2020-10-011-114/+177
|
* compilers: make is_cross part of the base Compiler classDylan Baker2020-09-241-2/+2
| | | | | | | Every class needs to set this, so it should be part of the base. For classes that require is_cross, the positional argument remains in their signature. For those that don't, they just allow the base class to set their value to it's default of False.
* compilers: make sanity_check_impl a protected methodDylan Baker2020-09-241-1/+1
| | | | It's an implementation detail after all
* Merge pull request #7447 from scivision/nvcJussi Pakkanen2020-08-221-4/+13
|\ | | | | Add support for NVidia HPC SDK compilers
| * add Nvidia HPC SDK compilersMichael Hirsch, Ph.D2020-07-131-4/+13
| |
* | Correctly determine C++ stds for Elbrus compilermakise-homura2020-08-201-5/+13
| |
* | fix msvc not recognising b_ndebugElliot Haisley2020-07-191-1/+1
|/ | | | fixes #7404
* compilers: add fetching of define list for clangYevhenii Kolesnikov2020-05-221-2/+3
| | | | | | | | | | | | | | | Simmilar to gcc, the list of pre-processor defines can be fetched with `-dM -E` option. The way cpu_family is determined on linux relies on this list. Fixes incorrect value of cpu_family on linux, when crosscompiling: ``` CC="clang -m32" meson ./build ``` Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
* Call to CPPCompilers initilisation function was missing the info parameter ↵Drew Reed2020-05-161-1/+3
| | | | during ArmClangCPPCompiler initialisation
* Compiler options per langJohn Ericson2020-04-201-89/+144
| | | | | | | | | | | A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
* compilers: Fix C++ stdlib flags used for Apple's ClangOle André Vadla Ravnås2020-03-291-2/+2
| | | | Should target libc++, not libstdc++.
* Fix legacy env var support with crossJohn Ericson2020-03-231-1/+1
| | | | Fix #3969
* -Add xc16 and c2000 C,Cpp toolchain supportalanNz2020-03-211-0/+33
|
* Merge pull request #6688 from dcbaker/emcc-linker-bugsJussi Pakkanen2020-03-081-2/+2
|\ | | | | Emcc linker bugs and improvments
| * compilers/linkers: Add a representation for wasm-ldDylan Baker2020-02-271-2/+2
| | | | | | | | | | | | | | Emscripten does have a stand alone linker, wasm-ld. This patch adds the linker, adds detection for the linker, and removes the IsLinkerMixin for emscripten. This is a little more correct, and makes the code a lot cleaner and more robust.
| * compilers/mixins/emscripten: Implement thread supportDylan Baker2020-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Emscripten has pthread support (as well as C++ threads), but we don't currently implement them. This fixes that by adding the necessary code. The one thing I'm not sure about is setting the pool size. The docs suggest that you really want to do this to ensure that your code works correctly, but the number should really be configurable, not sure how to set that. Fixes #6684
| * compilers/emcc: Fix inheritance orderDylan Baker2020-02-271-1/+1
| | | | | | | | | | | | Sot hat the BasicLinkerIsCompilerMixin comes before ClangCCompiler, which hides its "call the linker" methods, as emcc doesn't have a separate linker.
* | Set c_winlibs/cpp_winlibs for Clang in the same way as for GCCMartin Storsjö2020-03-031-0/+6
|/ | | | | clang-cl is handled as a separate case (ClangClCCompiler), which already gets c_winlibs from VisualStudioLikeCCompilerMixin.
* compilers: Split ClangCL and MSVC mixinsDylan Baker2020-01-281-5/+5
| | | | | | Instead of checking the compiler id inside the VisualStudioLikeCompiler class, this creates two subclasses that each represent the divergent behavior of the two compilers
* Remove RTTI option from get_option_compile_args() for Elbrus compilermakise-homura2020-01-271-0/+13
|
* Fix missing 'defines' argumet for Elbrus compilermakise-homura2020-01-271-1/+1
| | | | ...But somehow it still remains in C++ compiler.