Age | Commit message (Collapse) | Author | Files | Lines |
|
Add C2x option support.
|
|
|
|
Add support for NVidia HPC SDK compilers
|
|
|
|
|
|
Simmilar to gcc, the list of pre-processor defines can be fetched with
`-dM -E` option. The way cpu_family is determined on linux relies on
this list.
Fixes incorrect value of cpu_family on linux, when crosscompiling:
```
CC="clang -m32" meson ./build
```
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
|
|
A current rather untyped storage of options is one of the things that
contributes to the options code being so complex. This takes a small
step in synching down by storing the compiler options in dicts per
language.
Future work might be replacing the langauge strings with an enum, and
defaultdict with a custom struct, just like `PerMachine` and
`MachineChoice`.
|
|
Fix #3969
|
|
|
|
Emcc linker bugs and improvments
|
|
clang-cl is handled as a separate case (ClangClCCompiler), which already
gets c_winlibs from VisualStudioLikeCCompilerMixin.
|
|
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.
|
|
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
|
|
Sot hat the BasicLinkerIsCompilerMixin comes before ClangCCompiler,
which hides its "call the linker" methods, as emcc doesn't have a
separate linker.
|
|
cross-file, fixed assembly file use
|
|
Instead of checking the compiler id inside the VisualStudioLikeCompiler
class, this creates two subclasses that each represent the divergent
behavior of the two compilers
|
|
|
|
...But somehow it still remains in C++ compiler.
|
|
|
|
* environment: Fix passing always args to a number of less common linkers
These are mostly (oops xilink) proprietary linkers I can't use for
various reasons.
Fixes: #6332
* Add intelfix from scivision.
* Ifort fix from scivision.
* PGI fix from scivision.
* Cuda fix from scivision.
* Fix linker passing for armclang.
|
|
Pass options to linker detection
|
|
I'm sure there are other places that could use this, but I didn't see
any right off that bat.
|
|
We know that if a compiler class inherits CCompiler it's language will
be C, so doing this at the class level makes more sense.
|
|
|
|
|
|
|
|
|
|
|
|
Commit ff4a17dbef08a1d8afd075f57dbab0f5c76951ab modified the version
requirements wrongly. AppleClangC should be the one with higher version
numbers. Exchange them to fix the check.
|
|
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
|
|
This allows us to detect use classes rather than methods to determine
what C standards are available.
|
|
Most of the cuda code is from Olexa Bilaniuk.
Most of the PGI code is from Michael Hirsc
|
|
|
|
|
|
Error example:
Code:
#include <locale.h>
int main () {
/* If it's not defined as a macro, try to use as a symbol */
#ifndef LC_MESSAGES
LC_MESSAGES;
#endif
}
Compiler stdout:
Compiler stderr:
In file included from /usr/include/locale.h:25,
from /tmp/tmpep_i4iwg/testfile.c:2:
/usr/include/features.h:382:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
382 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
| ^~~~~~~
/tmp/tmpep_i4iwg/testfile.c: In function 'main':
/tmp/tmpep_i4iwg/testfile.c:8:9: error: control reaches end of non-void function [-Werror=return-type]
8 | }
| ^
cc1: some warnings being treated as errors
|
|
|
|
|
|
|
|
|
|
|
|
I debated a bit whether both classes really belong in the same module,
and decided that they do because the share a number of helpers.
|
|
|
|
|
|
|
|
The compilers module is rather large and confusing, with spaghetti
dependencies going every which way. I'm planning to start breaking out
the internal representations into a mixins submodule, for things that
shouldn't be required outside of the compilers module itself.
|
|
|
|
fix unit test skips for clang c18
correct unittests clang minimum version
cleanup unittest clang skip c_std
finesse unittest vs. clang version
|
|
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.
As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
|
|
|
|
This avoids the duplication where the option is stored in a dict at its
name, and also contains its own name. In general, the maxim in
programming is things shouldn't know their own name, so removed the name
field just leaving the option's position in the dictionary as its name.
|