summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/vala.py
AgeCommit message (Collapse)Author
2025-11-19compilers: Remove CoreDAta parameter from Compiler.cached_compileDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.get_option_link_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.find_libraryDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.thread_flagsDylan Baker
Same logic as the openmp flags
2025-11-19compilers: Remove Environment parameter from Compiler.sanity_checkDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.build_wrapper_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler._build_wrapperDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.compiles()Dylan Baker
2025-11-19Compilers: remove Environment parameter from Compiler.links()Dylan 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-13vala: utilize depfilesValeri Ochinski
2025-10-06Revert "compilers: refactor sanity checking code"Dylan Baker
This reverts commit 806289a5d27958a084bc6cba41b7cf9ccee4ecf4.
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-05-21compilers: add option for ignoring system dirsDavid Seifert
2025-02-13Make all Meson level options overridable per subproject.Jussi Pakkanen
2024-11-19compilers: avoid one or more version_compare per targetPaolo Bonzini
version_compare can take a few milliseconds. If you have a thousand object files or a multiple thereof, it adds up. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-07-30flake8: move unused typing-only imports to TYPE_CHECKINGEli Schwartz
2024-07-11Move OptionKey in the option source file.Jussi Pakkanen
2024-04-30Fix dependencies for vala.links #13158Ben Corby
Using the keyword argument dependencies with compiler.links() for vala doesn't work as the library being linked to needs to be prefixed with --pkg= before being passed to valac.
2024-04-23Fix compile.links for valaBen Corby
Fixes issue #12959 compiler.links command for vala crashes
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-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-12-05compilers: drop dead codeEli Schwartz
no_warn_args is unused. Its only purpose was to implement automatic hiding of UB in transpiled code, and it was not used at all in languages other than C/C++ -- specifically when the C/C++ source files were created by transpiling from vala or cython.
2023-07-19fix implicit_reexport issues and enforce them going forwardEli Schwartz
This detects cases where module A imports a function from B, and C imports that same function from A instead of B. It's not part of the API contract of A, and causes innocent refactoring to break things.
2023-07-12Match the method signatures of parent classesTristan Partin
Names and types of some methods did not match their parent methods.
2023-07-12Use CompileCheckMode enumTristan Partin
There were a ton of naked strings with TODOs telling us to use the enum.
2023-04-11Change "can not" to "cannot" throughout projectHiPhish
The word "cannot" expresses inability to do something whereas "can not" expresses the ability to refrain from doing something.
2023-03-16prevent lib prefix warning from pkg-configCharles Brunet
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-07-03move various unused typing-only imports into type-checking blocksEli Schwartz
2022-01-10compilers: push the compiler id to a class variableDylan Baker
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
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz
performed by running "pyupgrade --py36-plus" and committing the results
2021-01-04use OptionKey for builtin and base optionsDylan Baker
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-04use OptionKey for compiler_optionsDylan Baker
2020-10-01Compilers/vala: Add type annotationsDylan Baker
2020-09-24compilers: make is_cross part of the base Compiler classDylan Baker
Every class needs to set this, so it should be part of the base. For classes that require is_cross, the positional argument remains in their signature. For those that don't, they just allow the base class to set their value to it's default of False.
2020-09-24compilers: put name_string method in base compilerDylan Baker
Every language had the exact same implementation
2020-03-29compilers: Fix accidental coredata mutationsOle André Vadla Ravnås
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger
2019-12-12compilers: move language attribute to the class levelDylan Baker
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.
2019-10-07compilers: replace CompilerType with MachineInfoDylan Baker
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-07-20ValaCompiler: only emit '--debug' in debug build.Jeremy Philippe
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson
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.
2019-04-28Moved caching into a seperate functionDaniel Mensinger
2019-04-28Cache compile results in coredataDaniel Mensinger
2019-03-27Sanity check with external argsJohn Ericson
Previously cross, but not native, external args were used. Then in d451a4bd97f827bb492fd0c0e357cb20b6056ed9 the cross special cases were removed, so external args are never used. This commit switches that so they are always used. Sanity checking works just the same as compiler checks like has header / has library.
2019-03-11Add static as keyword to find_libraryNiklas Claesson
2019-02-15Remove get_cross_extra_flagsJohn Ericson
This is no longer needed, we just remove conditionals around it.
2019-02-04vala: Support position-independent executablesCorentin Noël