summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins/emscripten.py
AgeCommit message (Collapse)Author
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-10-06options: replace get_value with get_value_forPaolo Bonzini
The two methods are identical. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-21compilers: add option for ignoring system dirsDavid Seifert
2025-04-08coredata: move MutableKeyedOptionDict to optionsDylan Baker
2025-02-13Make all Meson level options overridable per subproject.Jussi Pakkanen
2025-02-05options: use dataclasses for UserOptionDylan Baker
This reduces code, makes this clearer, and will be a nice step toward the goal of getting everything typesafe. For `UserIntegerOption` this makes a fairly nice, but substantial change in that the old method used a tuple of `(min, value, max)` to pass to the initializer, while all other types just passed `value`. The new `UserIntegerOption` does the same, with keyword arguments for the min and max values.
2025-02-05compilers: remove Compiler.create_optionDylan Baker
This saves a *tiny* bit of typing, but at the cost of requiring either the current solution of throwing up our hands and saying "typing is too hard, better to have bugs!" or an extensive amount of `TypedDict`s, `overloads`, and a very new version of mypy. Let's get our type safety back, even if it means writing a little bit more code.
2024-07-30flake8: move unused typing-only imports to TYPE_CHECKINGEli Schwartz
2024-07-17Remove language (AKA compiler) type from OptionKey.Jussi Pakkanen
2024-07-11Move OptionKey in the option source file.Jussi Pakkanen
2024-06-14Replace direct indexing with named methods.Jussi Pakkanen
2024-06-14Rename option variable to optstore to make it unique.Jussi Pakkanen
2024-05-23Refactor option classes to their own file.Jussi Pakkanen
2024-03-15Improve error messages for invalid option valuesCharles Brunet
By adding the option name to UserOption object, it is now possible to display the name of the affected option when the given option value is not valid. Fixes #12635
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-07-12Fix the typing around Compiler._get_compile_output()Tristan Partin
This function says it returns a string, but was returning None in some cases.
2023-07-12Annotate naked fundamental Python typesTristan Partin
Although mypy wasn't complaining, pyright was.
2023-07-12Use CompileCheckMode enumTristan Partin
There were a ton of naked strings with TODOs telling us to use the enum.
2023-03-16prevent lib prefix warning from pkg-configCharles Brunet
2023-02-01treewide: add future annotations importEli Schwartz
2022-12-27emscripten: remove redundant `thread_flags` implementationKleis Auke Wolthuizen
Since it's the same as the one in `CLikeCompiler`.
2022-12-27emscripten: use single arguments when specifying optionsKleis Auke Wolthuizen
i.e. without a space between the "-s" and option name. See: https://github.com/emscripten-core/emscripten/issues/11463 This is supported since Emscripten 1.39.19, see: https://github.com/emscripten-core/emscripten/commit/f45bea21f3a8f74a68ed4e3e3d7e290807ee2aff
2022-12-27emscripten: prefer `-pthread` over `-s USE_PTHREADS=1`Kleis Auke Wolthuizen
See: https://github.com/emscripten-core/emscripten/issues/12346 This is supported since Emscripten 1.38.33, see: https://github.com/emscripten-core/emscripten/commit/24350798a8570f567327f873cf1efb0361aec284
2022-03-22OptionOverrideProxy: Make it immutable to avoid copiesXavier Claessens
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
2021-08-08Add support for finding Javascript source libraries with Emscripten.Jussi Pakkanen
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-20Avoid accidental use of STANDALONE_WASM mode on compiler testsBrion Vibber
Compiler tests, such as checking for atomics support, could fail when compiling to WebAssembly multithreaded targets because the compiler tests got compiled to 'output.wasm'. Using the '.wasm' suffix in recent versions of emscripten engages STANDALONE_WASM mode, which disables features that require a JS runtime like shared memory. This created false negatives on support of those features when building a library to be linked into an executable that is not in STANDALONE_WASM mode. Changing these to 'output.o' will continue to produce WebAssembly object files, but they will no longer be configured for standalone runtime mode.
2021-01-04Use a single coredata dictionary for optionsDylan Baker
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
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-04move OptionKey to mesonlibDylan Baker
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker
2020-11-09Fix WASM thread count option. Closes #7921.Jussi Pakkanen
2020-09-24compilers: Tell mypy that the compiler mixins are just thatDylan Baker
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-24compilers/mixins/emscripten: make type safeDylan Baker
2020-09-16linkers/compilers: Move an emscripten method to the compilerDylan Baker
This needed an attribute the linker doesn't have.
2020-02-27compilers/linkers: Add a representation for wasm-ldDylan Baker
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.
2020-02-27compilers/mixins/emscripten: Implement thread supportDylan Baker
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
2020-02-27compilers/emcc: Fix inheritance orderDylan Baker
Sot hat the BasicLinkerIsCompilerMixin comes before ClangCCompiler, which hides its "call the linker" methods, as emcc doesn't have a separate linker.
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger
2019-11-06Fix typos found by codespellWolfgang Stöggl
- Typos were found by codespell v1.16.0
2019-10-18emscripten: fix false positives in linking testsAndrei Alexeyev
2019-10-18Refactor duplicate Emscripten code into a mixinAndrei Alexeyev