summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #7600 from alexrp/masterJussi Pakkanen2020-08-231-2/+13
|\ | | | | Add C2x option support.
| * Add C2x option support.Alex Rønne Petersen2020-08-221-2/+13
| |
* | Merge pull request #7447 from scivision/nvcJussi Pakkanen2020-08-221-0/+9
|\ \ | |/ |/| Add support for NVidia HPC SDK compilers
| * add Nvidia HPC SDK compilersMichael Hirsch, Ph.D2020-07-131-0/+9
| |
* | msvc: enable /std:c11 flagMichael Hirsch2020-08-091-0/+20
|/
* 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>
* Compiler options per langJohn Ericson2020-04-201-43/+86
| | | | | | | | | | | 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`.
* 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/+91
|
* 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.
* -Fixed Renesas RX Family compiler to work with latest meson, updated ↵alanNz2020-01-301-0/+3
| | | | cross-file, fixed assembly file use
* compilers: Split ClangCL and MSVC mixinsDylan Baker2020-01-281-7/+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
* Bringing back defines in Elbrus C compiler to simplify environment.pymakise-homura2020-01-271-2/+3
|
* Fix missing 'defines' argumet for Elbrus compilermakise-homura2020-01-271-3/+3
| | | | ...But somehow it still remains in C++ compiler.
* types: import typing as T (fixes #6333)Daniel Mensinger2020-01-081-3/+3
|
* Updated linker MR (#6407)Jussi Pakkanen2020-01-061-1/+1
| | | | | | | | | | | | | | | | | | | * environment: Fix passing always args to a number of less common linkers These are mostly (oops xilink) proprietary linkers I can't use for various reasons. Fixes: #6332 * Add intelfix from scivision. * Ifort fix from scivision. * PGI fix from scivision. * Cuda fix from scivision. * Fix linker passing for armclang.
* Merge pull request #6065 from dcbaker/pass-options-to-linker-detectionJussi Pakkanen2019-12-171-1/+2
|\ | | | | Pass options to linker detection
| * compilers: move language attribute to the class levelDylan Baker2019-12-121-1/+2
| | | | | | | | | | 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.
* | compilers: make use of mlog.log_onceDylan Baker2019-12-131-5/+1
|/ | | | | I'm sure there are other places that could use this, but I didn't see any right off that bat.
* Use strict function prototypesMichael Hirsch, Ph.D2019-11-181-2/+2
|
* Refactor duplicate Emscripten code into a mixinAndrei Alexeyev2019-10-181-13/+2
|
* Fix emscripten C compiler initializationAndrei Alexeyev2019-10-151-3/+4
|
* Implement get_linker_output_args in Emscripten compilersAndrei Alexeyev2019-10-141-0/+3
|
* Implement get_allow_undefined_link_args in EmscriptenCCompilerAndrei Alexeyev2019-10-141-0/+4
|
* compilers: Fix version requirements for ClangC and AppleClangCTing-Wei Lan2019-10-111-4/+4
| | | | | | Commit ff4a17dbef08a1d8afd075f57dbab0f5c76951ab modified the version requirements wrongly. AppleClangC should be the one with higher version numbers. Exchange them to fix the check.
* compilers: replace CompilerType with MachineInfoDylan Baker2019-10-071-38/+68
| | | | | | 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
* compilers: Add a specific type for AppleClangCDylan Baker2019-10-071-4/+18
| | | | | This allows us to detect use classes rather than methods to determine what C standards are available.
* compilers: Dispatch to dynamic linker classDylan Baker2019-08-141-22/+2
| | | | | Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
* compilers: Make MSVClike compilers proxy extra keyword argumentsDylan Baker2019-08-141-6/+6
|
* Add basic Webassembly support via Emscripten.Jussi Pakkanen2019-08-051-0/+25
|
* Fix missing return statements that are seen with -Werror=return-type.Martin Liska2019-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* compilers: split pgi compiler out of compilers moduleDylan Baker2019-07-151-1/+1
|
* compilers: put elbrus in mixinsDylan Baker2019-07-151-1/+1
|
* compilers: Put clang mixin in a moduleDylan Baker2019-07-151-1/+1
|
* compilers: move ArmClang into mixins/arm.pyDylan Baker2019-07-151-2/+1
|
* compilers: Put Intel compiler classes into the mixins folderDylan Baker2019-07-151-2/+1
|
* compilers: split gnu and gnulike compilers out of compilersDylan Baker2019-07-151-1/+1
| | | | | I debated a bit whether both classes really belong in the same module, and decided that they do because the share a number of helpers.
* compilers: Move the VisualStudioLikeCompiler class into mixinsDylan Baker2019-07-151-1/+1
|
* compilers: Move ArmCompiler to a mixin moduleDylan Baker2019-07-151-1/+1
|
* compilers: move ccrx compiler abstraction into mixinsDylan Baker2019-07-151-2/+1
|
* compilers: Move clike into a mixins directoryDylan Baker2019-07-151-1/+1
| | | | | | | The compilers module is rather large and confusing, with spaghetti dependencies going every which way. I'm planning to start breaking out the internal representations into a mixins submodule, for things that shouldn't be required outside of the compilers module itself.
* Do not fail on passing `-Werror=unused-parameter` from environmentDavid Seifert2019-07-141-1/+1
|
* add clang c_std=c18 aliasMichael Hirsch, Ph.D2019-07-081-4/+7
| | | | | | | | | | fix unit test skips for clang c18 correct unittests clang minimum version cleanup unittest clang skip c_std finesse unittest vs. clang version
* Purge `is_cross` and friends without changing user interfacesJohn Ericson2019-06-091-25/+25
| | | | | | | | | | | | In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
* compilers/c: Fix removal of name from Combo options for ICLDylan Baker2019-06-061-1/+1
|
* UserOption no longer has a name field.John Ericson2019-05-151-10/+9
| | | | | | | This avoids the duplication where the option is stored in a dict at its name, and also contains its own name. In general, the maxim in programming is things shouldn't know their own name, so removed the name field just leaving the option's position in the dictionary as its name.