summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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.
* compilers: fix compiler.compile for Intel CompilersDylan Baker2018-11-151-4/+15
| | | | | has_arguments is the wrong thing to fix, since all checks that require compiler options are based on compiles, it's the right thing to modify.
* compilers: Fix the set of features that ICC exposesDylan Baker2018-11-151-1/+8
|
* compilers: Use keyword only arguments for compiler interfacesDylan Baker2018-11-131-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Because we need to inherit them in some cases, and python's keyword-or-positional arguments make this really painful, especially with inheritance. They do this in two ways: 1) If you want to intercept the arguments you need to check for both a keyword and a positional argument, because you could get either. Then you need to make sure that you only pass one of those down to the next layer. 2) After you do that, if the layer below you decides to do the same thing, but uses the other form (you used keyword by the lower level uses positional or vice versa), then you'll get a TypeError since two layers down got the argument as both a positional and a keyword. All of this is bad. Fortunately python 3.x provides a mechanism to solve this, keyword only arguments. These arguments cannot be based positionally, the interpreter will give us an error in that case. I have made a best effort to do this correctly, and I've verified it with GCC, Clang, ICC, and MSVC, but there are other compilers like Arm and Elbrus that I don't have access to.