Commit Graph

28 Commits

Author SHA1 Message Date
Renan Lavarec 4fedf19f41 asm: Add sx extension
docs: gcc https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
      scons: https://scons.org/doc/3.0.5/HTML/scons-user/apb.html

  .S      Windows:  assembly language file
          ARM: CodeSourcery Sourcery Lite
  .sx     assembly language file + C pre-processor
          POSIX:  assembly language file + C pre-processor
2023-03-23 12:22:12 -04:00
Eli Schwartz 680b5ff819
treewide: add future annotations import 2023-02-01 17:01:30 -05:00
David Robillard 81d7c24a59 Add warning_level=everything
Adds a new maximum warning level that is roughly equivalent to "all warnings".
This adds a way to use `/Wall` with MSVC (without the previous broken warning),
`-Weverything` with clang, and almost all general warnings in GCC with
strictness roughly equivalent to clang's `-Weverything`.

The GCC case must be implemented by meson since GCC doesn't provide a similar
option.  To avoid maintenance headaches for meson, this warning level is
defined objectively: all warnings are included except those that require
specific values or are specific to particular language revisions.  This warning
level is mainly intended for new code, and it is expected (nearly guaranteed)
that projects will need to add some suppressions to build cleanly with it.

More commonly, it's just a handy way to occasionally take a look at what
warnings are present with some compiler, in case anything interesting shows up
you might want to enable in general.

Since the warnings enabled at this level are inherently unstable with respect
to compiler versions, it is intended for use by developers and not to be set as
the default.
2022-11-27 16:50:48 -05:00
Jan Tojnar a590cfde0c compilers: Add optimization=plain option
https://github.com/mesonbuild/meson/pull/9287 changed the `optimization=0`
to pass `-O0` to the compiler. This change is reasonable by itself
but unfortunately, it breaks `buildtype=plain`, which promises
that “no extra build flags are used”.

`buildtype=plain` is important for distros like NixOS,
which manage compiler flags for optimization and hardening
themselves.

Let’s introduce a new optimization level that does nothing
and set it as the default for `buildtype=plain`.
2022-10-09 14:43:18 +03:00
Dylan Baker 1209b8820b compilers: push the compiler id to a class variable
It really is a per class value, and shouldn't be set per instance. It
also allows us to get rid of useless constructors, including those
breaking mypy
2022-01-10 15:53:26 -05:00
Ben Boeckel 28de74c994 armclang: clarify that this is support for the Keil cross-compiler 2021-12-16 17:08:10 -05:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Dylan Baker 71db6b04a3 use OptionKey for builtin and base options
I would have prefered to do these seperatately, but they are combined in
some cases, so it was much easier to convert them together.

this eliminates the builtins_per_machine dict, as it's duplicated with
the OptionKey's machine parameter.
2021-01-04 12:20:40 -08:00
Dylan Baker e7f0890cb9 compilers: move get_dependency_gen_args to base Compiler
So that every subclass doesn't have to reimplement it. Especially since
the Gnu implementation moved out of the CCompiler and into the
GnuLikeCompiler mixin
2020-10-01 15:05:00 -07:00
Dylan Baker 96a1ae6dfe compilers: fully type annotate the C compilers 2020-10-01 15:05:00 -07:00
Dylan Baker 682d22129c compilers: Tell mypy that the compiler mixins are just that
We do this by making the mixins inherit the Compiler class only when
mypy is examining the code (using some clever inheritance shenanigans).
This caught a bunch of issues, and also lets us delete a ton of code.
2020-09-24 12:14:13 -07:00
Dylan Baker b7db3660a0 compilers/mixins/arm: make type safe 2020-09-24 12:14:13 -07:00
Drew Reed 9a94ffe061 Modifed buildtypes and armclang compiler flags to match documented results 2020-05-22 18:28:09 +03:00
Drew Reed 3d41fa9b1e Add flags to support generation of dependency files with armclang 2020-05-16 16:37:09 +03:00
Drew Reed cce5f860b9 Modifed buildtypes and armcc compiler flags to match documented results 2020-05-16 16:36:47 +03:00
Szabi Tolnai e2b4e99d71 Fix ARMCC dependency generation.
Change-Id: I661684ee8adf5a998641369cf5f13641699742d5
2020-03-23 17:13:10 +02:00
alanNz 1682058dec -Fixed Renesas RX Family compiler to work with latest meson, updated cross-file, fixed assembly file use 2020-01-30 22:11:26 +02:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Daniel Mensinger ed9d125b9c lgtm: fix missing raise 2019-12-05 00:22:10 +02:00
Daniel Mensinger 80ec5e9d28 Fix all flake8 warnings 2019-10-20 17:44:43 +03:00
Dylan Baker 0c22798b1a compilers: replace CompilerType with MachineInfo
Now that the linkers are split out of the compilers this enum is
only used to know what platform we're compiling for. Which is
what the MachineInfo class is for
2019-10-07 12:08:20 -07:00
Dylan Baker 06dcbd50ee compilers: Dispatch to dynamic linker class
Most of the cuda code is from Olexa Bilaniuk.
Most of the PGI code is from Michael Hirsc
2019-08-14 13:13:23 -07:00
Jussi Pakkanen 9a62d6932b Make ARM compilers work on Linux. 2019-08-02 19:27:00 +03:00
Dylan Baker bc4438b34f compilers: Put clang mixin in a module 2019-07-15 10:59:22 -07:00
Dylan Baker 51b04204c9 compilers/mixins/arm: Add type annotations to armclang 2019-07-15 10:59:22 -07:00
Dylan Baker e879992114 compilers: move ArmClang into mixins/arm.py 2019-07-15 10:59:22 -07:00
Dylan Baker 51c66752a9 compilers/mixins/arm: Add type annotations 2019-07-15 10:59:22 -07:00
Dylan Baker ef448b95ae compilers: Move ArmCompiler to a mixin module 2019-07-15 10:59:22 -07:00