summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * | macOS: Remove more unused linkerlike argsnirbheek/strip-more-unused-linkerlike-argsNirbheek Chauhan2020-02-211-1/+19
| |/ | | | | | | | | | | | | `-L` and `-headerpad_max_install_names` are both linker arguments that are commonly passed in CFLAGS too. Closes https://github.com/mesonbuild/meson/issues/6294
* | compilers/compilers: Fix get_linker_idDylan Baker2020-02-211-1/+7
|/ | | | | Which could raise an AttributeError when used on languages like Java and C# that don't have separate compilers and linkers.
* compilers: Derive CompilerArgs from collections instead of typingNirbheek Chauhan2020-01-241-1/+1
| | | | | Deriving from typing.MutableSequence does not give us a usable sequence type on Python 3.5.2.
* typing: Fix compatibility with Python 3.5.2Nirbheek Chauhan2020-01-241-1/+1
| | | | | | | Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes https://github.com/mesonbuild/meson/issues/6427
* types: Fix/ignore flake8 B014/F811Daniel Mensinger2020-01-081-11/+11
|
* types: import typing as T (fixes #6333)Daniel Mensinger2020-01-081-69/+69
|
* add compiler.get_linker_id() methodMichael Hirsch, Ph.D2019-12-191-0/+3
| | | | | | | | | | | | | | | this can be useful for if/elif where linker behaviors must be considered. For example, clang with "link" vs gcc with "ld.bfd" etc. ci for compiler.get_linker_id() method doc add @FeatureNew check Co-Authored-By: Daniel Mensinger <daniel@mensinger-ka.de>
* Consider compiler arguments in linker detection logicDylan Baker2019-12-121-2/+4
| | | | | | | | | | | | | If a user passes -fuse-ld=gold to gcc or clang, they expect that they'll get ld.gold, not whatever the default is. Meson currently doesn't do that, because it doesn't pass these arguments to the linker detection logic. This patch fixes that. Another case that this is needed is with clang's --target option This is a bad solution, honestly, and it would be better to use $LD or a cross/native file but this is needed for backwards compatability. Fixes #6057
* Allow setting <lang>_args before the compiler is detectedDylan Baker2019-12-121-97/+82
| | | | | This is required to be able to pass compiler and linker arguments to the methods that try to guess what linker to use.
* compilers: Make get_display_language a class or static methodDylan Baker2019-12-121-2/+3
| | | | | | | | 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.
* Merge pull request #6207 from dcbaker/linker-optionJussi Pakkanen2019-12-111-0/+6
|\ | | | | Add a way to select the dynamic linker meson uses
| * Allow selecting the dynamic linkerDylan Baker2019-12-021-0/+6
| | | | | | | | | | | | | | This uses the normal meson mechanisms, an LD environment variable or via cross/native files. Fixes: #6057
* | compilers: Rework the CompilerArgs to be less awfulDylan Baker2019-12-051-71/+73
| | | | | | | | | | | | | | | | 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.
* | compilers: use import typing instead of from typing importDylan Baker2019-12-051-44/+47
| | | | | | | | | | | | | | | | `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.
* | lgtm: fix __eq__ not overridden when adding attributesDaniel Mensinger2019-12-051-0/+10
| |
* | lgtm: Actually supress the Non-standard exception warningDaniel Mensinger2019-12-051-6/+6
| |
* | lgtm: ignore Non-standard exception raised in special methodDaniel Mensinger2019-12-051-3/+3
| |
* | lgtm: Fix Module imported with `import` and `import from`Daniel Mensinger2019-12-051-30/+29
|/
* openbsd: execinfo is not a compiler libAntoine Jacoutot2019-11-251-2/+4
|
* Fix typos found by codespellWolfgang Stöggl2019-11-061-1/+1
| | | | - Typos were found by codespell v1.16.0
* Fix all flake8 warningsDaniel Mensinger2019-10-201-1/+1
|
* compilers: replace CompilerType with MachineInfoDylan Baker2019-10-071-44/+5
| | | | | | 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
* Merge pull request #5953 from mensinda/isystemJussi Pakkanen2019-10-061-1/+17
|\ | | | | Add is_system to dependency
| * Use -isystem instead of -idirafterDaniel Mensinger2019-10-031-1/+17
| |
* | cmake: fix detection of libraries with .so versionDaniel Mensinger2019-10-031-1/+1
|/
* Correctly handle platform-specific LDFLAGS optionsAleksey Gurtovoy2019-09-271-0/+5
|
* CUDA support on WindowsAleksey Gurtovoy2019-09-241-2/+11
|
* the solaris linker also needs start/end-group for circular linkingDylan Baker2019-09-091-2/+2
|
* mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy2019-09-051-7/+7
|
* compilers: Move the compiler argument to proxy linker flags to the compiler ↵Dylan Baker2019-08-301-0/+2
| | | | | | | | | | | | 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.
* compilers: Dispatch to dynamic linker classDylan Baker2019-08-141-166/+98
| | | | | Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
* Add basic Webassembly support via Emscripten.Jussi Pakkanen2019-08-051-0/+1
|
* Fix cross compilation on OSXXavier Claessens2019-08-041-2/+6
| | | | | Do not set -Wl,-headerpad_max_install_names when compiling on OSX for another platform. It causes linker issues.
* compilers: pull sanitzier args into compiler classesDylan Baker2019-07-231-16/+8
| | | | This simplifies and cleans things up.
* compilers: return as-needed args as a listDylan Baker2019-07-231-1/+1
|
* compilers: Move lto args into compiler classDylan Baker2019-07-231-5/+9
| | | | | | | | | 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.
* Add optional progress bar when generating build.ninjaNirbheek Chauhan2019-07-201-3/+3
|
* fix all flake8 issuesDaniel Mensinger2019-07-181-4/+3
|
* compilers: split pgi compiler out of compilers moduleDylan Baker2019-07-151-69/+0
|
* compilers/mixins/elbrus: add type annotations and fix typesDylan Baker2019-07-151-1/+1
| | | | | | | | | 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.
* compilers: put elbrus in mixinsDylan Baker2019-07-151-40/+0
|
* compilers: Put clang mixin in a moduleDylan Baker2019-07-151-61/+1
|
* compilers: move ArmClang into mixins/arm.pyDylan Baker2019-07-151-118/+0
|
* compilers: Put Intel compiler classes into the mixins folderDylan Baker2019-07-151-100/+0
|
* compilers: split gnu and gnulike compilers out of compilersDylan Baker2019-07-151-358/+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-386/+1
|
* compilers: Move ArmCompiler to a mixin moduleDylan Baker2019-07-151-109/+0
|
* compilers: move ccrx compiler abstraction into mixinsDylan Baker2019-07-151-129/+1
|
* move Gnu-specific feature '--print-search-dirs' to GnuLikeCompilerNorbert Nemec2019-07-071-0/+60
|
* Improve performance with windows defender ATPCharlie Barto2019-07-051-4/+4
|