summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
Commit message (Collapse)AuthorAgeFilesLines
...
* compilers: disable b_sanitize on hurdPino Toscano2020-04-101-1/+3
| | | | ASAN is not supported on the Hurd yet.
* quality / test: Fortran type hintingMichael Hirsch, Ph.D2020-04-052-19/+22
| | | | enhance fortran args tests
* Make cc.has_function work on GCC/Clang __builtinsAndrei Alexeyev2020-04-041-5/+6
|
* compilers: disable ccache when using temporary source filesLoïc Yhuel2020-03-291-0/+5
| | | | | When doing a compile test with a testfile.c, ccache fails since the path is random. So it's better to disable it, to avoid reporting this as a cache miss.
* compilers: Fix accidental coredata mutationsOle André Vadla Ravnås2020-03-295-6/+12
|
* compilers: Fix C++ stdlib flags used for Apple's ClangOle André Vadla Ravnås2020-03-291-2/+2
| | | | Should target libc++, not libstdc++.
* Only split linker args with D compilers. Closes: #6845Jussi Pakkanen2020-03-281-4/+8
|
* compilers: Clang can take linkers that are pathsDylan Baker2020-03-241-0/+14
| | | | | This will be a regression in 0.54.0 because we now enforce that gnu compilers only get gold, bfd, or lld.
* Fix legacy env var support with crossJohn Ericson2020-03-234-46/+32
| | | | Fix #3969
* Fix linker evn var testsJohn Ericson2020-03-231-1/+2
| | | | | | Just because we are on windows doesn't mean we can use `link`. This ought to be done better, but this will do for now.
* Fix ARMCC dependency generation.Szabi Tolnai2020-03-231-1/+1
| | | | Change-Id: I661684ee8adf5a998641369cf5f13641699742d5
* -Add xc16 and c2000 C,Cpp toolchain supportalanNz2020-03-215-0/+373
|
* Merge pull request #6789 from dcbaker/deprecated-c-ldJussi Pakkanen2020-03-192-4/+4
|\ | | | | Make linker selection environment variables match docs
| * compilers: Error if invalid linker selectedDylan Baker2020-03-172-4/+4
| |
* | Fix exe_wrapper usage in EmptyExternalProgram caseRichard Weinberger2020-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no exe_wrapper is set in the meson cross file the exe_wrapper object will be an instance of EmptyExternalProgram. So, found is True and prorgram is an empty list. This will cause meson to tun the compiler sanity check because it checks only for self.is_cross and self.exe_wrapper being not None. I ran into that situation while cross compiling for ia32 on a x64_64 host. The host had no ia32 userspace installed, so the self test failed. As workaround I currently set exe_wrapper to 'true'. Signed-off-by: Richard Weinberger <richard@nod.at>
* | compilers: Link D runtime/libphobs dynamically on !WindowsDylan Baker2020-03-192-1/+19
|/ | | | Fixes: #6786
* Merge pull request #6779 from dcbaker/gdc-linker-argsJussi Pakkanen2020-03-151-1/+1
|\ | | | | Allow setting linker for GDC as well as LDC
| * compilers/d: Support linker selection with gdcDylan Baker2020-03-121-1/+1
| | | | | | | | | | | | This should have worked before, but the inheritance order was backwards, so we got the DCompiler before the GnuCompiler, and the base Compiler methods overrode the Gnu methods.
* | Resolve Clang failure to use -Og with --optimization=gPhillip Johnston2020-03-151-2/+9
|/ | | | | | | | Clang supports the GCC -Og flag, but --optimization=g is not setting that. This is because Clang is referencing the clike_optimization_args, which does not define a flag for 'g'. To address this, we'll mimic the GNU options instead of the C-like ones. Fixes #6619
* Merge pull request #6356 from dcbaker/fix-d-compiler-abstractionsJussi Pakkanen2020-03-123-34/+74
|\ | | | | Fix d compiler abstractions
| * compilers: Don't put split soname args in start groupsDylan Baker2020-03-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group This modifies the shared library test to demonstrate the problem, with a test case. Fixes #6359
| * compilers/d: Properly pass -soname argsDylan Baker2020-03-111-4/+17
| |
| * compilers/d: Fix rpath generation with LDC and DMDDylan Baker2020-03-111-14/+18
| |
| * linkers: Move import_library_args to from VS compiler to linkerDylan Baker2020-03-091-4/+0
| | | | | | | | | | | | | | This is the argument to name the implib when using the Visual Studio Linker. This is needed by LDC and DMD when using link.exe or lld-link.exe on windows, and is really a linker argument not a compiler argument.
| * Allow invoking the linker directly through dmdDylan Baker2020-03-091-0/+3
| | | | | | | | | | DMD is awful in a lot of ways. To change the linker you set an environment variable, which is pretty much impossible for us.
| * Allow invoking link.exe and lld-link.exe through ldc2Dylan Baker2020-03-091-0/+4
| | | | | | | | Like it wants
| * compilers: Don't deduplicate -L= argumentsDylan Baker2020-03-061-0/+9
| | | | | | | | This breaks LDC and DMD, so just don't do it.
| * compilers/d: Fix get_allow_undefined_link_args on macOSDylan Baker2020-03-061-0/+11
| | | | | | | | | | | | | | | | | | DMD and LDC are a real pain to use as linkers. On Unices they invoke the C compiler as the linker, just like meson does. This means we have to figure out what C compiler they're using and try to pass valid arguments to that compiler if the D compiler doesn't understand the linker arguments we want to pass. In this case that means gcc or clang. We can use-the -Xcc to pass arguments directly to the C compiler without dmd/ldc getting involved, so we'll use that.
| * compilers/d: Remove CompilerIsLInkerMixinDylan Baker2020-03-061-16/+6
| | | | | | | | | | | | | | This was never really true of the D compilers, it made them more complicated than necessary and was incorrect in many cases. Removing it causes no regressions on Linux, at least in our rather limited test cases).
* | Merge pull request #6532 from jon-turney/languages-native-kwargJussi Pakkanen2020-03-092-0/+11
|\ \ | | | | | | Add add_languages(native:)
| * | Improve error reported when language has no compilerJon Turney2020-02-122-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | This gives consistent reporting of this error for all platforms. Also, reporting this error when constructing the BuildTarget, rather than discovering the problem during backend generation means that the error is reported against with a location.
* | | Merge pull request #6736 from dcbaker/mesonlib-type-annotationsJussi Pakkanen2020-03-081-0/+2
|\ \ \ | | | | | | | | Mesonlib type annotations
| * | | mesonlib: Replace unholder argument to listifyDylan Baker2020-03-051-0/+2
| | |/ | |/| | | | | | | | | | | | | listify shouldn't be unholdering, it's a function to turn scalar values into lists, or flatten lists. Having a separate function is clearer, easier to understand, and can be run recursively if necessary.
* | | Merge pull request #6688 from dcbaker/emcc-linker-bugsJussi Pakkanen2020-03-084-15/+31
|\ \ \ | |/ / |/| | Emcc linker bugs and improvments
| * | compilers/linkers: Add a representation for wasm-ldDylan Baker2020-02-273-24/+4
| | | | | | | | | | | | | | | | | | | | | 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-273-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/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