summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/asm.py
AgeCommit message (Collapse)Author
2025-11-19compilers: Remove Environment parameter from Compiler.sanity_checkDylan Baker
2025-11-19compilers: Stop passing `is_cross`Dylan Baker
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
2025-11-19compilers: Pass Environment instead of MachineInfoDylan Baker
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.
2025-11-01Compilers: Add get_depfile_format() methodLuca Bacci
2025-10-29compilers/asm: Move arch support check to initializerDylan Baker
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.
2025-10-29compilers/asm: Introduce an ASMCompiler base classDylan Baker
This will be able to hold some shared state between the different ASM compilers (or should that be assemblers?)
2025-10-14compilers: make link/lld-link check homogeneousPaolo Bonzini
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>
2025-10-07Revert "compilers/asm: Introduce an ASMCompiler base class"Dylan Baker
This reverts commit 1e254ad7f327e5ed2021463e4b66c37072d354e3.
2025-10-07Revert "compilers/asm: Move arch support check to initializer"Dylan Baker
This reverts commit be50d0e23737dc0fc5f074a291644d7fde39ef7b.
2025-10-06Revert "compilers: refactor sanity checking code"Dylan Baker
This reverts commit 806289a5d27958a084bc6cba41b7cf9ccee4ecf4.
2025-10-06Revert "compilers/asm: Store the C Compiler inside the Assembly Compilers"Dylan Baker
This reverts commit 8847c938dd1c9e2c6e64e3050eb58f7ec54fccb3.
2025-10-06Revert "compilers/asm: Implement infrastructure for sanity checking"Dylan Baker
This reverts commit 08221c6d1fc4a6afe780a479bbc7e40899242601.
2025-10-06Revert "compilers/asm: Implement sanity checking code for NASM on Windows ↵Dylan Baker
and Linux" This reverts commit c520e8981693056419d846f60ffb85061bf3191f.
2025-10-06compilers/asm: Implement sanity checking code for NASM on Windows and LinuxDylan Baker
This leaves other systems to be implemented, as I don't have a good way of checking that they work correctly.
2025-10-06compilers/asm: Implement infrastructure for sanity checkingDylan Baker
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.
2025-10-06compilers/asm: Store the C Compiler inside the Assembly CompilersDylan Baker
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.
2025-10-06compilers: refactor sanity checking codeDylan Baker
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.
2025-10-06compilers/asm: Move arch support check to initializerDylan Baker
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
2025-10-06compilers/asm: Introduce an ASMCompiler base classDylan Baker
This will be able to hold some shared state between the different ASM compilers (or should that be assemblers?)
2025-01-09Add Linear ASM compilerWu, Zhenyu
Fix #13670
2024-08-07compilers: change get_argument_syntax to static methodKacper Michajłow
This allows to get this fixed value before the class is initialized. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2024-07-11Move OptionKey in the option source file.Jussi Pakkanen
2024-07-10nasm: Add -mms-bitfields to the list of ignored flagsL. E. Segovia
Fixes building Nasm objects with Meson's native language support, when depending against a library that exports that flag, like Glib.
2024-04-09nasm, yasm: Fix debug flags for Windows and macOSL. E. Segovia
2024-04-09nasm, yasm: Fix debug flags for Windows and macOSL. E. Segovia
2023-12-23Remove `get_buildtype_args` functionCharles Brunet
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
2023-10-20add missing imports for future annotationsEli Schwartz
2023-10-19Remove duplicated code to canonicalize b_vscrt option valueXavier Claessens
Add a common function that infers vscrt from buildtype in Compiler base class.
2023-09-18Metrowerks assembler should not inherit opt args from mixinNomura
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.
2023-07-12Annotate naked fundamental Python typesTristan Partin
Although mypy wasn't complaining, pyright was.
2023-07-12Replace some type comments with annotationsTristan Partin
2023-06-26linkers: delay implementations import until detect is runEli Schwartz
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.
2023-05-06Initial support for Metrowerks AssemblerNomura
2023-04-24yasm: Fix usage of incompatible optimization flagsL. E. Segovia
Fixes #11726
2023-02-20nasm: Link with windows CRT libs when nasm is used as linker languageXavier Claessens
2023-02-14asm: Use more backward-compatible invocation syntax for nasmSimon McVittie
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>
2023-01-18 Fix nasm when target has threads as added dependencyGijs Peskens
2022-11-05nasm: Fix get_optimization_args()Ole André Vadla Ravnås
2022-11-01nasm: Implement get_crt_compile_args()Xavier Claessens
This fix a crash when using NASM on Windows.
2022-10-25Compilers: Keep ccache and exelist separatedXavier Claessens
Only combine them in the Compiler base class, this will make easier to run compiler without ccache.
2022-10-24Add MASM compilerXavier Claessens
ml and armasm are Microsoft's Macro Assembler, part of MSVC.
2022-10-24Add yasm as fallback for nasm languageXavier Claessens
2022-10-24Add NASM compilerXavier Claessens