meson+qjsc+codegen: misc improvements#1187
Closed
mochaaP wants to merge 15 commits intoquickjs-ng:masterfrom
Closed
meson+qjsc+codegen: misc improvements#1187mochaaP wants to merge 15 commits intoquickjs-ng:masterfrom
mochaaP wants to merge 15 commits intoquickjs-ng:masterfrom
Conversation
fixup: 5a949ca ("CMake: Set _WIN32_WINNT=0x0601", quickjs-ng#900)
the original is -Ddisable_parser, invert that to make it less confusing
fixup: 8dda2a0 ("fixed hash_map_resize() - added Map/WeakMap in microbench")
fixup: 0a00011 ("Optimize {__proto__:null} object literal creation", quickjs-ng#1118)
fixup: 08db51a ("Add ref-counted string slices", quickjs-ng#1175)
skips building: qjs/qjsc cli, examples, tests, codegen
Store the original file path in module_loader_opaque, let normalize function read from that and store a normalized filepath in context opaque, and make module loader read from the filepath from that. Make it possible to preserve the custom script name while resolving from another path.
also removed -M during the test_fib.c codegen: 902cc2c ("Add native module support on Windows") switched examples to dynamic import() instead of static import statement and the lookup was deferred to runtime, thus we don't need to hint qjsc this is a declared module and exclude it from bundling.
Fix unable to `import {fib} from './fib.so';` using qjs cli
Contributor
Author
|
I should probably split PRs; this quickly grew out of scope 😅 Please merge this manually (qjsc changes first, then meson changes, and last codegen changes) to preserve commit history if you would like to squash them. |
Contributor
Author
[PATCH] build/meson: add unicode_gen testsdiff --git a/meson.build b/meson.build
index 1121d8c..5864195 100644
--- a/meson.build
+++ b/meson.build
@@ -373,6 +373,16 @@ endif
tests = get_option('tests').disable_auto_if(meson.is_subproject())
examples = get_option('examples').disable_auto_if(meson.is_subproject())
+# Unicode generator
+unicode_gen = executable(
+ 'unicode_gen',
+ 'cutils.c',
+ 'unicode_gen.c',
+
+ c_args: qjs_c_args + (tests.allowed() ? ['-DUSE_TEST'] : []),
+ build_by_default: false,
+)
+
if tests.allowed()
if host_system != 'emscripten'
# Test262 runner
@@ -501,19 +511,17 @@ if tests.allowed()
build_by_default: false,
),
)
+
+ test(
+ 'unicode_gen_test',
+ unicode_gen,
+ args: [
+ meson.current_source_dir() / 'unicode',
+ ],
+ )
+
endif
-# Unicode generator
-unicode_gen = executable(
- 'unicode_gen',
- 'cutils.c',
- 'libunicode.c',
- 'unicode_gen.c',
-
- c_args: qjs_c_args,
- build_by_default: false,
-)
-
run_target(
'libunicode-table.h',
command: [omitted because unicode test currently fails. |
Contributor
Author
|
https://github.com/mcha-forks/quickjs/tree/mochaa-meson-gen support full source bootstrap on both native and cross (no prebuilt |
this will fallback to the old path if not found.
Contributor
|
Could you please split these into semantic PRs? |
Contributor
Author
|
sure, later this day. |
This was referenced Oct 14, 2025
Merged
Contributor
Author
|
see the mentioned PRs above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the referenced commits in messages.
A potential breaking change is the
-Dparserone, but since builds will fail with:rather than building the normal variant silently, i think it's okay for this change.