-
Notifications
You must be signed in to change notification settings - Fork 203
meson+qjsc+codegen: misc improvements #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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
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. |
[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. |
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.
Could you please split these into semantic PRs? |
sure, later this day. |
See the referenced commits in messages.
A potential breaking change is the
-Dparser
one, but since builds will fail with:rather than building the normal variant silently, i think it's okay for this change.