Commit Graph

918 Commits

Author SHA1 Message Date
Nathanael Gray c2956269f5 Add -g for debug builds. 2021-11-27 20:08:14 +02:00
Nathanael Gray 2bc3117408 Fix more code which appears copied from CcrxCompiler. 2021-11-27 20:08:14 +02:00
Denis Feklushkin 1b1ecec920 ldc2: invoke -Oz instead of -Os 2021-11-22 12:35:28 -08:00
William Toohey 679adc7bf5 Support ancient (<3.4.0) gcc versions 2021-11-16 06:45:33 -05:00
Eli Schwartz ee5428d64f only pass clang LTO arguments when they are needed
If the LTO threads == 0 clang will default to the same argument we
manually pass, which meant we dropped support for admittedly ancient
versions of clang that didn't yet add that option.

Drop the extraneous argument, and add a specific error condition when
too old versions of clang are detected.

Fixes #9569
2021-11-15 22:00:53 +02:00
Nathanael Gray ae3d495c37 Remove incorrect arguments for C2000 C++ compiler. Add correct form for output and include args. 2021-11-14 21:59:59 +02:00
Dylan Baker f48d75dcae compilers/java: Add no_warn_args and debug_args methods 2021-11-08 23:33:14 +02:00
Eli Schwartz 038b31e72b
various manual conversion of percent-formatted strings to f-strings 2021-11-01 20:26:18 -04:00
William D. Jones 94a5ffabf3 Add 64-bit paths to check for unsupported Watcom cl.exe clones. 2021-10-31 21:38:53 -04:00
Eli Schwartz 384151c541 migrate python 3.5 compatible superclass variable annotations to 3.6
As we now require python 3.6, we can declare their types without
initializing them.
2021-11-01 00:46:51 +02:00
Eli Schwartz f36c01ede9 Revert "known Python 3.5 on windows workaround for subprocess(cwd=str(Path))"
This reverts commit c89aa20941.

We no longer support 3.5 so this can go.
2021-11-01 00:46:51 +02:00
Xavier Claessens 7a12c911bf Remove duplicated CEXE_MAPPING table 2021-10-29 22:42:21 +03:00
Eli Schwartz 8947352889 fix various flake8 whitespace errors 2021-10-27 09:51:52 -04:00
Jussi Pakkanen 4840c86ec9 Add sccache support. 2021-10-25 19:59:49 -04:00
Moroz Oleg 012ec7d5b3 Add stdc++20 support for Visual Studio 2019 v16.11
fix #9242
2021-10-24 17:08:13 +03:00
Dylan Baker 034b3a92d9 compilers/rust: fix typo in standard description 2021-10-21 13:48:01 -04:00
Dylan Baker 841dc2a4e7 compilers/rust: add support for the 2021 edition 2021-10-21 13:48:01 -04:00
Xavier Claessens a3f3ddf581 cuda: Override std=none to avoid host_compiler to emit -std argument 2021-10-14 14:17:50 -04:00
Christian Clauss a5020857f3 Fix typos discovered by codespell 2021-10-10 16:12:25 -04:00
Vladimír Čunát 98d1ec7a32 clike compilers: drop semicolon at function end
warning: ISO C does not allow extra ';' outside of a function [-Wpedantic]
2021-10-07 09:42:52 -07:00
Jesse Natalie b19530bd7d Fix compiler detection for cl/clang-cl
If the compiler specified is a path to a compiler, the current detection is broken. It needs to use just the compiler name instead.
2021-10-06 13:35:24 -07:00
Eli Schwartz 4ab70c5512
fix extra whitespace
discovered via flake8 --select E303
2021-10-04 16:29:31 -04:00
Eli Schwartz 52c4df1ba7
use idiomatic python for membership tests
"X not in Y" is preferred over "not X in Y", as the former is more
readable.
2021-10-04 16:29:31 -04:00
makise-homura e58b3adc70 Fix mypy errors 2021-09-29 20:16:02 -07:00
makise-homura 0021a21930 compilers/elbrus: Deal with C/C++/Fortran stds more correctly 2021-09-29 20:16:02 -07:00
makise-homura 0ed2d2719b compilers: Select correct clang on e2k for C++ and ObjC++ 2021-09-29 20:16:02 -07:00
makise-homura fe0809360d compilers: There is clang for e2k (elbrus) platform finally 2021-09-29 20:16:02 -07:00
makise-homura 79f9a2076a compilers/elbrus: Support prelinking with lcc correctly 2021-09-29 20:16:02 -07:00
makise-homura d9b379df87 compilers/elbrus: Fix incorrect inheritance model of Elbrus*Compiler 2021-09-29 20:16:02 -07:00
Jussi Pakkanen fa47d8dab0
Merge pull request #9014 from bonzini/mixed-language-link
Use appropriate compiler for the source file for "links" tests with file argument
2021-09-28 17:32:44 +03:00
Jussi Pakkanen f6ae82169c
Merge pull request #8773 from dcbaker/submit/rustc-enhancements-clippy
More enhancements for Rust + clippy support
2021-09-25 14:42:12 +03:00
Dylan Baker 30202a2402 compilers/rust: Add support for clippy
Clippy is a compiler wrapper for rust that provides an extra layer of
linting. It's quite popular, but unfortunately doesn't provide the
output of the compiler that it's wrapping in it's output, so we don't
detect that clippy is rustc. This small patch adds a new compiler class
(that is the Rustc class with a different id) and the necessary logic to
detect that clippy is in fact rustc)

Fixes: #8767
2021-09-24 18:48:48 -07:00
Dylan Baker 6ca732991d compilers/detect: use linker_always_args as well as linker exe_list
Otherwise we don't get critical arguments like -fuse=lld.
2021-09-24 18:48:48 -07:00
Dylan Baker 6514abf681 rustc: implement pic args 2021-09-24 18:48:48 -07:00
Dylan Baker d32fc0563d compilers/rust: Implement warning levels
Currently this implements 3 warning levels, 1 and 2 are just the
"default" set by rustc, 3, is "everything is a warning", and 0 is
"nothign is a warning".
2021-09-24 18:48:48 -07:00
Dylan Baker e2260650a0 rust: Add werror arguments 2021-09-24 18:48:48 -07:00
Dylan Baker 79ed1f985c compilers/detect: avoid mutating rustc compiler list
Because mutation is bad.
2021-09-24 18:48:48 -07:00
Dylan Baker 64c267c49c compilers: Add default search path stdlib_only_link_flags
This should be done in all cases of language_stdlib_only_link_flags, but
I don't have access to all of the compilers to test it.

This is required in cases where object files created by gfortran are
linked using another compiler with a differen default search path, such
as gfortran and clang together.
2021-09-25 00:18:22 +03:00
Jussi Pakkanen fee5cb697c
Merge pull request #9167 from dcbaker/submit/meson-main-type-checking
Add type annotations and type checking to meson main
2021-09-24 23:40:52 +03:00
Dylan Baker 68c23a6120 Add option to to transpile Cython to C++
This patch adds a new meson built-in option for cython, allowing it to
target C++ instead of C as the intermediate language. This can, of
course, be done on a per-target basis using the `override_options`
keyword argument, or for the entire project in the project function.

There are some things in this patch that are less than ideal. One of
them is that we have to add compilers in the build layer, but there
isn't a better place to do it because of per target override_options.
There's also some design differences between Meson and setuptools, in
that Meson only allows options on a per-target rather than a per-file
granularity.

Fixes #9015
2021-09-24 22:56:46 +03:00
Dylan Baker 9795323b86 pylint: check for duplicate imports
I ran into one of these from LGTM, and it would be nice if pylint could
warn me as part of my local development process instead of waiting for
the CI to tell me.
2021-09-24 10:36:05 -07:00
Andrea Pappacoda 68eca11cc6 Use -Oz when optimization=s in Clang
-Oz is the appropriate flag to use when you want to produce the smallest
possible binary, and is one would expect when setting optimization to s
or using the minsize build type.
2021-09-21 09:58:48 -07:00
Rohit Goswami 32ba349f0a compilers: Use standards compliant test 2021-09-20 01:29:59 -04:00
miebka 59fe80602e C2000: Added depfile generation for incremental builds 2021-09-16 02:37:13 +03:00
Eli Schwartz 87e13af1c8
apply flake8 fixes for unused imports and missing imports 2021-09-14 15:55:07 -04:00
Eli Schwartz cbfdfca089
compilers: publicly export one more constant
It is imported from a subpackage in __init__ alongside a big list of
other things which are all exported. And elsewhere, this import is
re-imported by other code. It's pretty clearly an oversight that it
didn't get added to __all__
2021-09-14 15:50:29 -04:00
Mat Cross 85a5aed60f nagfor preprocessor flag. 2021-09-10 16:08:57 -04:00
Mat Cross 436a257c50 Comments on nagfor options setup. 2021-09-10 16:08:57 -04:00
Mat Cross 0e86258748 Implemented some missing operation for the NAG Fortran Compiler. 2021-09-10 16:08:57 -04:00
Eli Schwartz 3f796c43df objc/objcpp compiler: accept all gnu stds corresponding to c/c++ stds
The clang compiler now reimplements and re-checks the c_std and cpp_std
options in order to use them for objc as well, but it didn't
consistently support the same options. First it completely excluded all
the gnu ones, and then it added a handful of them but not for C++.

Be fully consistent -- or at least as consistent as we can be, given a
minimally working fix. (The C/C++ compiler mixin actually gates
different stds depending on detected clang version, we do not do that
here.)

Fixes regression in c54dd63547
Fixes incomplete fix from #8766 (which didn't fix objcpp at all)

Fixes #9237
2021-09-10 13:03:56 -07:00