summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
AgeCommit message (Collapse)Author
2021-03-19split program related classes and functions out of dependenciesDylan Baker
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-09Add address sanitizer support for Visual Studio.Jussi Pakkanen
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz
performed by running "pyupgrade --py36-plus" and committing the results
2021-01-11move handling of CFLAGS and friends to environmentDylan Baker
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.
2021-01-04use OptionKey for builtin and base optionsDylan Baker
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.
2021-01-04move OptionKey to mesonlibDylan Baker
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 Baker
2021-01-04Add choices to OptionProxyDylan Baker
they're probably not strictly needed, but it makes mypy happy.
2020-12-10compilers: add support for c++20/gnu++20Florian Schmaus
Fixes #8084.
2020-11-12compilers: define standards in the base language compilerDylan Baker
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.
2020-11-12compilers: Standardize the names of compiler optionsDylan Baker
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-06compilers: Enable C++20 for Intel C++ Compiler.Vinson Lee
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>
2020-10-01compilers/icl fix IntelClCPP argument checkingDylan Baker
Unlike MSVC and ClangCl it needs to call into it's own compiler check args
2020-10-01compilers: move get_compile_check_args() to CompilerDylan Baker
This is groundwork to put _build_wrapper in the base Compiler, which is needed to make the D compilers truly type safe.
2020-10-01compilers/cpp: Add type annotationsDylan Baker
2020-09-24compilers: make is_cross part of the base Compiler classDylan Baker
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.
2020-09-24compilers: make sanity_check_impl a protected methodDylan Baker
It's an implementation detail after all
2020-08-22Merge pull request #7447 from scivision/nvcJussi Pakkanen
Add support for NVidia HPC SDK compilers
2020-08-20Correctly determine C++ stds for Elbrus compilermakise-homura
2020-07-19fix msvc not recognising b_ndebugElliot Haisley
fixes #7404
2020-07-13add Nvidia HPC SDK compilersMichael Hirsch, Ph.D
2020-05-22compilers: add fetching of define list for clangYevhenii Kolesnikov
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>
2020-05-16Call to CPPCompilers initilisation function was missing the info parameter ↵Drew Reed
during ArmClangCPPCompiler initialisation
2020-04-20Compiler options per langJohn Ericson
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`.
2020-03-29compilers: Fix C++ stdlib flags used for Apple's ClangOle André Vadla Ravnås
Should target libc++, not libstdc++.
2020-03-23Fix legacy env var support with crossJohn Ericson
Fix #3969
2020-03-21-Add xc16 and c2000 C,Cpp toolchain supportalanNz
2020-03-08Merge pull request #6688 from dcbaker/emcc-linker-bugsJussi Pakkanen
Emcc linker bugs and improvments
2020-03-03Set c_winlibs/cpp_winlibs for Clang in the same way as for GCCMartin Storsjö
clang-cl is handled as a separate case (ClangClCCompiler), which already gets c_winlibs from VisualStudioLikeCCompilerMixin.
2020-02-27compilers/linkers: Add a representation for wasm-ldDylan Baker
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.
2020-02-27compilers/mixins/emscripten: Implement thread supportDylan Baker
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
2020-02-27compilers/emcc: Fix inheritance orderDylan Baker
Sot hat the BasicLinkerIsCompilerMixin comes before ClangCCompiler, which hides its "call the linker" methods, as emcc doesn't have a separate linker.
2020-01-28compilers: Split ClangCL and MSVC mixinsDylan Baker
Instead of checking the compiler id inside the VisualStudioLikeCompiler class, this creates two subclasses that each represent the divergent behavior of the two compilers
2020-01-27Remove RTTI option from get_option_compile_args() for Elbrus compilermakise-homura
2020-01-27Fix missing 'defines' argumet for Elbrus compilermakise-homura
...But somehow it still remains in C++ compiler.
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger
2019-12-17Merge pull request #6065 from dcbaker/pass-options-to-linker-detectionJussi Pakkanen
Pass options to linker detection
2019-12-13compilers: make use of mlog.log_onceDylan Baker
I'm sure there are other places that could use this, but I didn't see any right off that bat.
2019-12-12compilers: Make get_display_language a class or static methodDylan Baker
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 Baker
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.D
2019-11-06Fix typos found by codespellWolfgang Stöggl
- Typos were found by codespell v1.16.0
2019-11-02Add option for controlling RTTI.Jussi Pakkanen
2019-11-02Pass explicit command line argument to disable exceptions with MSVC.Jussi Pakkanen
2019-10-18Refactor duplicate Emscripten code into a mixinAndrei Alexeyev
2019-10-15Fix emscripten C compiler initializationAndrei Alexeyev
2019-10-14Implement get_linker_output_args in Emscripten compilersAndrei Alexeyev
2019-10-14Implement get_allow_undefined_link_args in EmscriptenCPPCompilerAndrei Alexeyev
2019-10-07compilers: replace CompilerType with MachineInfoDylan Baker
Now that the linkers are split out of the compilers this enum is only used to know what platform we're compiling for. Which is what the MachineInfo class is for
2019-10-07compilers: Add a specific type for AppleClangCDylan Baker
This allows us to detect use classes rather than methods to determine what C standards are available.