summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | This is the fork "sneyx1234/meson" of the current git "mesonbuild/meson" ↵Simon Ney2019-05-131-0/+3
|/ | | | | | head to converge it to the solaris 11.4 platform based on the sparcv9 and i386 processor architecture. The purpose is to complete the porting related to the fork "sneyx1234/ast" of "att/ast" the "AT&T kornshell".
* compilers: Split C-Like functionality into a mixin classesDylan Baker2019-05-031-0/+329
| | | | | | | | | | | | | | | | | Currently C++ inherits C, which can lead to diamond problems. By pulling the code out into a standalone mixin class that the C, C++, ObjC, and Objc++ compilers can inherit and override as necessary we remove one source of diamonding. I've chosen to split this out into it's own file as the CLikeCompiler class is over 1000 lines by itself. This also breaks the VisualStudio derived classes inheriting from each other, to avoid the same C -> CPP inheritance problems. This is all one giant patch because there just isn't a clean way to separate this. I've done the same for Fortran since it effectively inherits the CCompiler (I say effectively because was it actually did was gross beyond explanation), it's probably not correct, but it seems to work for now. There really is a lot of layering violation going on in the Compilers, and a really good scrubbing would do this code a lot of good.
* Merge pull request #4952 from mensinda/cacheCompilesDylan Baker2019-05-021-40/+56
|\ | | | | Cache compilers.compile() in coredata
| * Moved caching into a seperate functionDaniel Mensinger2019-04-281-26/+35
| |
| * Fixed typeingDaniel Mensinger2019-04-281-12/+12
| |
| * Annotaded return types in the base compiler classDaniel Mensinger2019-04-281-22/+22
| |
| * Print '(cached)' when compiler result was cachedDaniel Mensinger2019-04-281-0/+2
| |
| * Cache compile results in coredataDaniel Mensinger2019-04-281-8/+13
| |
* | better default order for fotran compiler searchMichael Hirsch, Ph.D2019-04-271-4/+11
|/ | | | | | | | correct PGI windows detection doc cleanup PGI detect
* Don't use len() to test for container emptinessDylan Baker2019-04-251-1/+1
| | | | | | I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
* Use individual entries for '-Wl,-rpath-link'Fernando Ramos2019-04-221-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | When the '-Wl,-rpath-link' option refers to several folders, we can either use one single entry, like this: -Wl,-rpath-link,/path/to/folder1:/path/to/folder2:/path/to/folder3 ...or we can use multiple entries, like this: -Wl,-rpath-link,/path/to/folder1 -Wl,-rpath-link,/path/to/folder2 -Wl,-rpath-link,/path/to/folder3 Because the '-rpath-link' requires full folder paths, using the one single entry option can result in a very long argument. While this shouldn't be a problem, at least *one* toolchain (the latest version of the Tensilica toolchain for Xtensa processors) segfaults when using arguments that are too long. Because other toolchains might be affected and because using multiple entries instead of a very long one doesn't seem to have any drawback, this patch changes the arguments building logic to use multiple '-Wl,-rpath-link' entries.
* Merge pull request #5250 from jon-turney/test-compiler-reportJussi Pakkanen2019-04-201-0/+6
|\ | | | | Add a report of compilers used to run_project_tests.py
| * Push formatting of compiler version string down into Compiler classJon Turney2019-04-121-0/+6
| |
* | Making number of arguments consistent in get_library_dirsmakise-homura2019-04-191-1/+1
|/
* Use LDFLAGS only on languages that need it. Closes #5215.Jussi Pakkanen2019-04-091-1/+12
|
* compilers: Log difference between empty and absent env varJohn Ericson2019-03-271-12/+19
|
* Small cleanup to use_preproc_flags:John Ericson2019-03-271-2/+2
| | | | | | - Add type signature - Use set not tuple for homongenous membership test.
* Don't collect preprocssor flags separately from compiler flagsJohn Ericson2019-03-271-9/+11
| | | | | | | | | | I recall that @jpakkane never wanted this, but @nirbheek did, but then @nirbheek changed his mind. I am fine either way except for the cross inconsistency that exists today: There is no `c_preproc_args` or similar one can put in the cross file, so no way to replicate the effect of CPPFLAGS during cross compilation.
* compilers: n_debug=if-release and buildtype=plain should not enable assertionsDylan Baker2019-03-261-1/+1
| | | | | | | It's a bit odd that it doesn't, and has resulted in bugs in distro packaging. Fixes #5141
* Fix setup so test suite runs with rustc + MSVC. Closes: 5099Jussi Pakkanen2019-03-241-1/+0
|
* compilers: Try harder to dedup builtin libsNirbheek Chauhan2019-03-141-1/+7
| | | | | | | | Compiler internal libs should always be de-duplicated, no matter what. Closes https://github.com/mesonbuild/meson/issues/2150 Test case is by Bruce Richardson in the issue.
* Fix indent to please codestyle.Antoine Jacoutot2019-03-111-3/+3
|
* GnuLikeCompiler: don't set b_lundef by default on OpenBSDAntoine Jacoutot2019-03-111-2/+4
| | | | | | | OpenBSD does not link libc into shared libraries by default to avoid binding libraries to specific libc majors. So prevent passing "-Wl,--no-undefined" or "-zdefs" when linking (those options have always suffered false positives on this operating system).
* Feed compiler Properties to get its options defaultedJohn Ericson2019-02-271-9/+29
| | | | | | | Before, the logic initialization compiler options from environment variables vs config files was strewn about. Now, it is consolidated. We leverage the new `envconfig.py` module to expose the configuration data to `compilers.py` without creating an import cycle.
* Add warning level zerojml17952019-02-191-4/+7
|
* Improve handling of gui_appAndrei Alexeyev2019-02-181-2/+2
| | | | | | | | | | | | | This does two things: * On windows GCC-like compilers, the subsystem is always explicitly specified (either -mwindows or -mconsole). MSVC is already explicit. * The gui_app linker flags are now added after those mandated by external dependencies. This is because some misguided libraries (such as SDL) think that hijacking `main()` and forcing `-mwindows` in link flags is clever. We must unconditionally override such misuses to let gui_app work as intended.
* Remove get_cross_extra_flagsJohn Ericson2019-02-151-8/+0
| | | | This is no longer needed, we just remove conditionals around it.
* BUGFIX: Fortran openmpMichael Hirsch, Ph.D2019-02-131-13/+13
|
* Never access environment.properties downstreamJohn Ericson2019-02-021-6/+9
| | | | | | | | | | | | | | | | | Instead use coredata.compiler_options.<machine>. This brings the cross and native code paths closer together, since both now use that. Command line options are interpreted just as before, for backwards compatibility. This does introduce some funny conditionals. In the future, I'd like to change the interpretation of command line options so - The logic is cross-agnostic, i.e. there are no conditions affected by `is_cross_build()`. - Compiler args for both the build and host machines can always be controlled by the command line. - Compiler args for both machines can always be controlled separately.
* correct naming to CudaCompiler, pep8Michael Hirsch, Ph.D2019-01-291-1/+1
|
* BUGFIX: broken/missing Fortran code/unit testsMichael Hirsch, Ph.D2019-01-271-1/+1
|
* All the fixes needed to make work against current master.Jussi Pakkanen2019-01-211-4/+15
|
* added cuda compilerBeau Johnston2019-01-211-1/+10
|
* Add PGI C and C++ compilers (#4803)Michael Hirsch, Ph.D2019-01-211-7/+45
|
* FlangFortranCompiler inherit ClangCompilerMichael Hirsch, Ph.D2019-01-161-25/+0
|
* better handle link args: PGI and FlangMichael Hirsch, Ph.D2019-01-161-2/+8
| | | | correct flang, pgi options
* Flang Fortran compiler added.Michael Hirsch, Ph.D2019-01-161-0/+23
|
* restore PGI compile functioningMichael Hirsch, Ph.D2019-01-151-0/+21
|
* Absolute path generation refactoringDaniel Mensinger2019-01-061-0/+31
|
* Remove cross_info; cross file is parsed up front and discardedJohn Ericson2019-01-021-7/+4
|
* Handle strings in cross file args. Closes #4671.Jussi Pakkanen2019-01-021-2/+2
|
* Merge pull request #4573 from jon-turney/msys2-clangJussi Pakkanen2018-12-211-5/+4
|\ | | | | More clang for Windows support
| * Windows clang supports `-mwindows` to set subsystemJon Turney2018-12-091-5/+4
| | | | | | | | Promote get_gui_app_args from class GnuCompiler to GnuLikeCompiler
* | compilers/icc: Add even more diag-errors to actually error onDylan Baker2018-12-161-0/+4
|/ | | | This is a classy compiler.
* Reinstate "compilers/c: Fix allow undefined link arg for PE/COFF"Martin Storsjö2018-12-091-0/+3
| | | | | This reinstates 2256e6314b610b8f6645d0c5384536001ddeccf9, which was lost in refactoring in 9f9cfd21396db5cd5eb1711916c8b0c6e433c702.
* Deduplicate export-dynamic and pthread. Closes #4567.Jussi Pakkanen2018-12-061-1/+15
|
* Remove linkerlike args from compile checks. Closes #4542.Jussi Pakkanen2018-11-271-0/+3
|
* compilers: Move get_allow_undefined_link_args to CompilerDylan Baker2018-11-151-0/+14
| | | | | | | This allows each implementation (gnu-like) and msvc to be implemented in their respective classes rather than through an if tree in the CCompiler class. This is cleaner abstraction and allows us to clean up the Fortran compiler, which was calling CCompiler bound methods without an instance.
* compilers: ICC should error when an unknown __attribute__ is testedDylan Baker2018-11-151-0/+1
|
* compilers: Enable PGO for ICCDylan Baker2018-11-151-5/+24
| | | | | | | | ICC doesn't use the same -fprofile-generate/-fprofile-use that GCC and Clang use, instead it has -prof-gen and -prof-use. I've gone ahead and added the threadsafe option to -prof-gen, as meson currently doesn't have a way to specify that level of granularity and GCC and Clang's profiles are threadsafe.