| Age | Commit message (Collapse) | Author |
|
|
|
This is calculated by `Environment().is_cross_build(for_machine)`. Since
we have that in the Compiler class, just calculate it in the Compiler
initializer
|
|
We end up needing it everywhere, so just store it. This patch is huge
already, so it's just the conversion to passing Environment, more
cleanups to come.
|
|
|
|
It really isn't a sanity check that a specific compiler doesn't work on
a specific platform. This re-implements the check as a shared component
in the ASMCompiler base class, which has the advantage of code sharing.
|
|
This will be able to hold some shared state between the different ASM
compilers (or should that be assemblers?)
|
|
Use the same check for all of clang, nasm and rustc.
This also avoids the following warning:
Sanity check compiler command line: clang++ sanitycheckobjcpp.mm -o sanitycheckobjcpp.exe -D_MT -D_DLL -D_DEBUG -D_FILE_OFFSET_BITS=64 -Wl,-fms-runtime-lib=dll_dbg Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option /fms-runtime-lib=dll_dbg; ignored
iWhat happens is that -fms-runtime-lib sets up an automatic dependency
from the .o files to the final link product, and therefore must be
passed as a compiler argument. But the constructor for ClangCompiler
was incorrectly allowing b_vscrt for MINGW, so I messed up the logic.
With this change, MINGW won't get the b_vscrt option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This reverts commit 1e254ad7f327e5ed2021463e4b66c37072d354e3.
|
|
This reverts commit be50d0e23737dc0fc5f074a291644d7fde39ef7b.
|
|
This reverts commit 806289a5d27958a084bc6cba41b7cf9ccee4ecf4.
|
|
This reverts commit 8847c938dd1c9e2c6e64e3050eb58f7ec54fccb3.
|
|
This reverts commit 08221c6d1fc4a6afe780a479bbc7e40899242601.
|
|
and Linux"
This reverts commit c520e8981693056419d846f60ffb85061bf3191f.
|
|
This leaves other systems to be implemented, as I don't have a good way
of checking that they work correctly.
|
|
ASM has some special concerns because it has to be implemented in terms
of assembling an object, and then linking the object with a linker or
linker driver. That makes the implementation somewhat complex.
There is a bit of a hack going on here with the `_run_sanity_check`
method and the mro. I'm still thinking about how best to handle that.
|
|
Such as NASM and MASM. These compilers don't actually do any linking,
the just produce object files. As such, we need the C compiler to link
the program in order to make things like sanity_check work.
|
|
The goal is to reduce code duplication, and allow each language to
implement as little as possible to get good checking. The main
motivation is that half of the checks are fragile, as they add the work
directory to the paths of the generated files they want to use. This
works when run inside mesonmain because we always have an absolute build
directory, but when put into run_project_tests.py it doesn't work
because that gives a relative build directory.
|
|
It really isn't a sanity check that a specific compiler doesn't work on
a specific platform. This re-implements the check as a shared component
int he ASMCompiler base class, which has the advantage of code sharing
|
|
This will be able to hold some shared state between the different ASM
compilers (or should that be assemblers?)
|
|
Fix #13670
|
|
This allows to get this fixed value before the class is initialized.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
|
|
|
|
Fixes building Nasm objects with Meson's native language support, when
depending against a library that exports that flag, like Glib.
|
|
|
|
|
|
This is a first step to make `buildtype` a true alias of `debug` and
`optimization` options.
See #10808.
Relates to:
- #11645
- #12096
- #5920
- #5814
- #8220
- #8493
- #9540
- #10487
- #12265
- #8308
- #8214
- #7194
- #11732
|
|
|
|
Add a common function that infers vscrt from buildtype in Compiler base
class.
|
|
The Metrowerks assembler does not support optimization flags.
However, it received the same opt args as the Metrowerks C and C++
compilers, because it inherits from the 'MetrowerksCompiler' mixin.
This broke builds with opt level higher than 0 that used the Metrowerks
Assembler, as the latter received unsupported args. This is now fixed.
|
|
Although mypy wasn't complaining, pyright was.
|
|
|
|
This saves on a 1500-line import at startup and may be skipped entirely
if no compiled languages are used. In exchange, we move the
implementation to a new file that is imported instead.
Followup to commit ab20eb5bbc21ae855bcd211131132d2778602bcf.
|
|
|
|
Fixes #11726
|
|
|
|
Before version 2.14.01, -MD required an output filename argument, with
`-MD outfile` equivalent to later versions' `-MD -MF outfile`. The older
syntax is still supported, and is still listed as the preferred syntax
in documentation.
Reference: https://github.com/netwide-assembler/nasm/commit/3475462e
Resolves: https://github.com/mesonbuild/meson/issues/11395
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
|
|
|
This fix a crash when using NASM on Windows.
|
|
Only combine them in the Compiler base class, this will make easier to
run compiler without ccache.
|
|
ml and armasm are Microsoft's Macro Assembler, part of MSVC.
|
|
|
|
|