summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
Commit message (Collapse)AuthorAgeFilesLines
...
| * | compilers/mixins/islinker: Add stubs for thread_*_flagsDylan Baker2020-02-271-0/+6
| | |
| * | compilers/emcc: Fix inheritance orderDylan Baker2020-02-273-2/+3
| | | | | | | | | | | | | | | | | | Sot hat the BasicLinkerIsCompilerMixin comes before ClangCCompiler, which hides its "call the linker" methods, as emcc doesn't have a separate linker.
| * | compilers/mixins/islinker: Add missing methodDylan Baker2020-02-271-0/+3
| | | | | | | | | | | | In particular emcc needs this
* | | Set c_winlibs/cpp_winlibs for Clang in the same way as for GCCMartin Storsjö2020-03-032-0/+12
| | | | | | | | | | | | | | | clang-cl is handled as a separate case (ClangClCCompiler), which already gets c_winlibs from VisualStudioLikeCCompilerMixin.
* | | meson: cache the results of can_compileMarcel Hollerbach2020-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | the check for which files can be compiled are called again and again on the same files over and over again. Caching this here shaves off 11s of the build time of efl (which has grown in the last 3 versions to over 40 sec. again)
* | | CompilerArgs: make lookup fasterMarcel Hollerbach2020-03-011-7/+26
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in order to deduplicate arguments as much as possible, we need to check if a argument is already part of the list. Which is quite slow because we are checking 3 lists for that. In smaller projects this might be not of interested. However, in efl things are quite "heavy", alone generating the ninja file took 40 sec.. 16 sec. are spent in __iadd__ of CompilerArgs. What this patch does to speed this all up is: 1. We only check if a element is in post when we know that it must be in post same for pre. 2. the checks for if we already do contain a specific value are now done via a dict, and not via the list. This overall brings the time from 16 sec. spent in __iadd__ to 9 sec. in __iadd__. Another possible solution for all this is to have a internal structure of CompileArgs of trees, so you have the "basic" layer of arguments where the position does not matter. Additionally, you have two stacks of lists, the pre stack and the post stack, duplicates can then be checked when itereting, which would safe another ~4s in terms of efl. However, i do not have time for this undertaking right now.
* | Merge pull request #6637 from ↵Jussi Pakkanen2020-02-231-0/+3
|\ \ | | | | | | | | | | | | mesonbuild/nirbheek/implement-symbolextractor-windows Implement symbolextractor on windows + some cleanups/fixes
| * | ninjabackend: List PDBs in output list for targetsNirbheek Chauhan2020-02-221-0/+3
| |/ | | | | | | | | | | | | | | | | | | This is more correct, and forces the target(s) to be rebuilt if the PDB files are missing. Increases the minimum required Ninja to 1.7, which is available in Ubuntu 16.04 under backports. We can't do the same for import libraries, because it is impossible for us to know at configure time whether or not an import library will be generated for a given DLL.
* | Merge pull request #6668 from ↵Jussi Pakkanen2020-02-211-1/+19
|\ \ | | | | | | | | | | | | mesonbuild/nirbheek/strip-more-unused-linkerlike-args macOS: Remove more unused linkerlike args
| * | 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.
* -Fixed Renesas RX Family compiler to work with latest meson, updated ↵alanNz2020-01-303-2/+11
| | | | cross-file, fixed assembly file use
* compilers: Use /Zi instead of /ZI with clang-clDylan Baker2020-01-281-4/+13
| | | | | | | Clang-cl doesn't support /ZI, so we need to use either /Zi or /Z7, which both do the same thing for clang-cl (though not for msvc) Fixes #6414
* compilers: Split ClangCL and MSVC mixinsDylan Baker2020-01-283-38/+75
| | | | | | 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 Sider errorsmakise-homura2020-01-271-1/+1
|
* Remove RTTI option from get_option_compile_args() for Elbrus compilermakise-homura2020-01-271-0/+13
|
* Add missing functions to Elbrus compiler classmakise-homura2020-01-271-0/+11
|
* Fix missing 'defines' argumet for Elbrus compilermakise-homura2020-01-274-6/+6
| | | | ...But somehow it still remains in C++ compiler.
* 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-0824-323/+323
|
* 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.
* 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>
* Merge pull request #6065 from dcbaker/pass-options-to-linker-detectionJussi Pakkanen2019-12-1714-122/+123
|\ | | | | Pass options to linker detection
| * Consider compiler arguments in linker detection logicDylan Baker2019-12-122-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-127-12/+11
| | | | | | | | | | | | | | | | 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.
| * compilers: move language attribute to the class levelDylan Baker2019-12-1212-13/+26
| | | | | | | | | | 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.
* | default inc dirs: Fix warning on MSYS (fixes #6336)Daniel Mensinger2019-12-151-5/+8
| |
* | intel/intel-cl: handle arguments in intel-specific wayMichael Hirsch, Ph.D2019-12-141-20/+38
| | | | | | | | | | | | | | intel compiler's defaults are different enough from MSVC and GNU that it's necessary to set specific defaults for Intel compilers. This corrects/improves behaviors initially addressed in b1c8f765fa6e2a
* | compilers: make use of mlog.log_onceDylan Baker2019-12-132-6/+2
|/ | | | | I'm sure there are other places that could use this, but I didn't see any right off that bat.
* Merge pull request #6207 from dcbaker/linker-optionJussi Pakkanen2019-12-114-1/+19
|\ | | | | Add a way to select the dynamic linker meson uses
| * Allow selecting the dynamic linkerDylan Baker2019-12-024-1/+19
| | | | | | | | | | | | | | 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: fix Multiple calls to __init__Daniel Mensinger2019-12-051-3/+3
| | | | | | | | | | | | | | Some slight refactoring for the dependency classes and I switched the elbrus compiler to the GnuLikeCompiler. This is also the correct use according to the documentation of GnuLikeCompiler.
* | lgtm: Actually supress the Non-standard exception warningDaniel Mensinger2019-12-051-6/+6
| |
* | lgtm: Fix redundant codeDaniel Mensinger2019-12-051-1/+0
| |
* | lgtm: fix Missing call to __init__ during object initializationDaniel Mensinger2019-12-051-0/+1
| | | | | | | | | | | | Either mark the missing calls as intentional, or explicetly call the right __init__ method and avoid mixing super() and explicit base calss calls.
* | lgtm: fix missing raiseDaniel Mensinger2019-12-051-1/+1
| |
* | 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-052-37/+35
| |
* | intel/intel-cl: use appropriate buildtype optionsMichael Hirsch, Ph.D2019-12-042-16/+40
|/ | | | | | | | This puts appropriate default options across buildtype for Intel and Intel-Cl compilers, for C, C++ and Fortran. Prior to this PR, the behavior of Intel compilers vs. GNUlike was not the same, in particular, debug traceback available by default for GNUlike compilers was not present with Intel compilers.
* complete gfortran/intel/intel-cl fortran_std testMichael Hirsch, Ph.D2019-11-251-1/+53
|
* openbsd: execinfo is not a compiler libAntoine Jacoutot2019-11-251-2/+4
|
* Fix compute_int() when the value is -1Xavier Claessens2019-11-211-1/+1
|
* Fix cross-compilation of D programsEric Le Bihan2019-11-191-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since version 9.1, GCC provides support for the D programming language. Thus it is easy to build a cross-compiler for D, such as aarch64-unknown-linux-gnu-gdc. However to cross-compile a Meson project using D, using a cross build definition such as the following is not enough: ``` [binaries] d = '/path/to/aarch64-unknown-linux-gnu-gdc' exe_wrapper = '/path/to/qemu-aarch64-static' [properties] needs_exe_wrapper = true [host_machine] system = 'linux' cpu_family = 'aarch64' cpu = 'cortex-a53' endian = 'little' ``` Indeed, "exe_wrapper" is not be taken into account. Build will fail with: ``` Executables created by D compiler /path/to/aarch64-uknown-linux-gnu-gdc are not runnable. ``` This patch fixes this by reworking: - detect_d_compiler() to properly get exe_wrapper and D compilers and detect the one available. - Dcompiler to properly handle exe_wrapper.