summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
AgeCommit message (Collapse)Author
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-11Merge pull request #6207 from dcbaker/linker-optionJussi Pakkanen
Add a way to select the dynamic linker meson uses
2019-12-05compilers: Rework the CompilerArgs to be less awfulDylan Baker
There are two awful things about CompilerArgs, one is that it directly inherits from list, and there are a lot of subtle gotcahs with inheriting from builtin types. The second is that the class allows arguments to be passed in whatever order. That's bad. This also fully annotates the CompilerArgs class, so mypy can type check it for us.
2019-12-05compilers: use import typing instead of from typing importDylan Baker
`from foo import` should be used sparingly because of namespace pollution, especially since those names will be exported unconditionally. For typing this is extra annoying because anytime someone wants to use another symbol from the typing module they have to add it to the import line. Use `import typing` to avoid all of this.
2019-12-05lgtm: fix __eq__ not overridden when adding attributesDaniel Mensinger
2019-12-05lgtm: Actually supress the Non-standard exception warningDaniel Mensinger
2019-12-05lgtm: ignore Non-standard exception raised in special methodDaniel Mensinger
2019-12-05lgtm: Fix Module imported with `import` and `import from`Daniel Mensinger
2019-12-02Allow selecting the dynamic linkerDylan Baker
This uses the normal meson mechanisms, an LD environment variable or via cross/native files. Fixes: #6057
2019-11-25openbsd: execinfo is not a compiler libAntoine Jacoutot
2019-11-06Fix typos found by codespellWolfgang Stöggl
- Typos were found by codespell v1.16.0
2019-10-20Fix all flake8 warningsDaniel Mensinger
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-06Merge pull request #5953 from mensinda/isystemJussi Pakkanen
Add is_system to dependency
2019-10-03cmake: fix detection of libraries with .so versionDaniel Mensinger
2019-10-03Use -isystem instead of -idirafterDaniel Mensinger
2019-09-27Correctly handle platform-specific LDFLAGS optionsAleksey Gurtovoy
2019-09-24CUDA support on WindowsAleksey Gurtovoy
2019-09-09the solaris linker also needs start/end-group for circular linkingDylan Baker
2019-09-05mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy
2019-08-30compilers: Move the compiler argument to proxy linker flags to the compiler ↵Dylan Baker
class Instead of the DynamicLinker returning a hardcoded value like `-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be something '-Xlinker=' This makes a few things cleaner, and will make it possible to fix using clang (not clang-cl) on windows, where it invokes either link.exe or lld-link.exe instead of a gnu-ld compatible linker.
2019-08-14compilers: Dispatch to dynamic linker classDylan Baker
Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
2019-08-05Add basic Webassembly support via Emscripten.Jussi Pakkanen
2019-08-04Fix cross compilation on OSXXavier Claessens
Do not set -Wl,-headerpad_max_install_names when compiling on OSX for another platform. It causes linker issues.
2019-07-23compilers: pull sanitzier args into compiler classesDylan Baker
This simplifies and cleans things up.
2019-07-23compilers: return as-needed args as a listDylan Baker
2019-07-23compilers: Move lto args into compiler classDylan Baker
There are two problems, one is that it assumes -flto is the argument to do LTO/WPO, which isn't true of ICC and MSVC (and presumably) others. It's also incorrect because it assumes that the compiler and linker will always be the same, which isn't necessarily true. You could combine GCC with Apple's linker, or clang with link.exe, which use different arguments.
2019-07-20Add optional progress bar when generating build.ninjaNirbheek Chauhan
2019-07-18fix all flake8 issuesDaniel Mensinger
2019-07-15compilers: split pgi compiler out of compilers moduleDylan Baker
2019-07-15compilers/mixins/elbrus: add type annotations and fix typesDylan Baker
There is a pretty big error in here, trying to return a tuple comperhension: (a for a in []) is not a tuple, it's a generator. This has profound type annotations: generators don't support most tuple or list methods, and they can only be iterated once. Beyond that tuples are meant for heterogenous types, ie, position matters for types. I've converted the output to a list in all cases.
2019-07-15compilers: put elbrus in mixinsDylan Baker
2019-07-15compilers: Put clang mixin in a moduleDylan Baker
2019-07-15compilers: move ArmClang into mixins/arm.pyDylan Baker
2019-07-15compilers: Put Intel compiler classes into the mixins folderDylan Baker
2019-07-15compilers: split gnu and gnulike compilers out of compilersDylan Baker
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.
2019-07-15compilers: Move the VisualStudioLikeCompiler class into mixinsDylan Baker
2019-07-15compilers: Move ArmCompiler to a mixin moduleDylan Baker
2019-07-15compilers: move ccrx compiler abstraction into mixinsDylan Baker
2019-07-07move Gnu-specific feature '--print-search-dirs' to GnuLikeCompilerNorbert Nemec
2019-07-05Improve performance with windows defender ATPCharlie Barto
2019-06-27Fix two errors when cross-compiling with ValaJames Westman
- AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs' Fixed by adding a `get_program_dirs()` function to the base Compiler class, to match `get_library_dirs()` - KeyError: 'vala_COMPILER' Fixed by creating the Vala compile rules for all machines, not just the build machine.
2019-06-27sanitycheckc: avoid linking sanitycheckc when cross compilingCody Schafer
2019-06-13tvOS: added support AppleTVOSRoman Shpuntov
2019-06-12Solaris fixesKurtis Rader
Fixes #5351
2019-06-11compilers: armclang supports only cross-compilationsompen
Revert the change done to Armclang compiler class in PR-4010
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson
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.
2019-05-15UserOption no longer has a name field.John Ericson
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.
2019-05-14Merge pull request #5331 from dcbaker/iclJussi Pakkanen
ICL (Intel for Windows) support
2019-05-13compilers: Add basic ICL abstractionsDylan Baker