Skip to content

Commit

Permalink
try to sync makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
justjake committed Dec 25, 2023
1 parent cd34339 commit 1ce00ea
Show file tree
Hide file tree
Showing 44 changed files with 220 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Variant-specific Emscripten build flags:
"-lasync.js",
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s SINGLE_FILE=1",
Expand Down
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-browser-release-asyncify-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Variant-specific Emscripten build flags:
"-lasync.js",
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s EXPORT_ES6=1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Variant-specific Emscripten build flags:
[
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s SINGLE_FILE=1",
Expand Down
10 changes: 1 addition & 9 deletions doc/@jitl/quickjs-browser-release-sync-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,7 @@ Full variant JSON description:
Variant-specific Emscripten build flags:

```json
[
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s EXPORT_ES6=1",
"-s ENVIRONMENT=web,worker"
]
["-Oz", "-flto", "--closure 1", "-s FILESYSTEM=0", "-s EXPORT_ES6=1", "-s ENVIRONMENT=web,worker"]
```

***
Expand Down
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-node-cjs-release-asyncify-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Variant-specific Emscripten build flags:
"-lasync.js",
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s ENVIRONMENT=node"
Expand Down
2 changes: 1 addition & 1 deletion doc/@jitl/quickjs-node-cjs-release-sync-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Full variant JSON description:
Variant-specific Emscripten build flags:

```json
["-Oz", "-flto", "-s SINGLE_FILE=1", "--closure 1", "-s FILESYSTEM=0", "-s ENVIRONMENT=node"]
["-Oz", "-flto", "--closure 1", "-s FILESYSTEM=0", "-s ENVIRONMENT=node"]
```

***
Expand Down
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-node-esm-release-asyncify-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Variant-specific Emscripten build flags:
"-lasync.js",
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s EXPORT_ES6=1",
Expand Down
10 changes: 1 addition & 9 deletions doc/@jitl/quickjs-node-esm-release-sync-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,7 @@ Full variant JSON description:
Variant-specific Emscripten build flags:

```json
[
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s EXPORT_ES6=1",
"-s ENVIRONMENT=node"
]
["-Oz", "-flto", "--closure 1", "-s FILESYSTEM=0", "-s EXPORT_ES6=1", "-s ENVIRONMENT=node"]
```

***
Expand Down
24 changes: 22 additions & 2 deletions generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
// Generate header file
import * as fs from "fs-extra"
import * as pathlib from "path"
const USAGE = "Usage: generate.ts [symbols | header | ffi] WRITE_PATH"
import * as crypto from "crypto"
const USAGE =
"Usage: generate.ts [symbols | header | ffi] WRITE_PATH" +
"\ngenerate.ts hash READ_PATH WRITE_PATH"

const rooted = (path: string) => pathlib.join(__dirname, path)

Expand Down Expand Up @@ -47,7 +50,7 @@ export function getMatches(context: Context) {
}

function main() {
const [, , command, destination] = process.argv
const [, , command, destination, hashDestination] = process.argv
const context = new Context()

if (!command || !destination) {
Expand Down Expand Up @@ -97,6 +100,11 @@ function main() {
return
}

if (command === "hash") {
updateHashFile(destination, hashDestination)
return
}

throw new Error(`Bad command "${command}". ${USAGE}`)
}

Expand Down Expand Up @@ -373,6 +381,18 @@ export function replaceAll(
return result
}

function updateHashFile(src: string, dest: string) {
const bytes = fs.readFileSync(src)
const hash = crypto.createHash("md5").update(bytes).digest("hex") + "\n"
try {
const existing = fs.readFileSync(dest, "utf-8")
if (existing === hash) {
return
}
} catch (e) {}
fs.writeFileSync(dest, hash)
}

if (require.main === module) {
main()
}
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
"type": "git",
"url": "https://github.com/justjake/quickjs-emscripten"
},
"files": [
"README.md",
"LICENSE",
"variants.json"
],
"scripts": {
"prepack": "yarn build && yarn check:package",
"tarball": "rm -rf $PWD/build/tar && mkdir -p $PWD/build/tar && yarn for-each-package-cmd pack --out $PWD/build/tar/%s.tgz",
Expand Down
3 changes: 3 additions & 0 deletions packages/quickjs-ffi-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"files": [
"dist/**/*"
],
"types": "dist/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
"./package.json": "./package.json",
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ clean:
WASM: $(DIST)/emscripten-module.js $(DIST)/emscripten-module.d.ts
WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json

$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC)
$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS)

$(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts
echo '// Generated from $<' > $@
cat $< >> $@

$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) (BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $<

$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $<

Expand All @@ -131,3 +131,7 @@ $(BUILD_WRAPPER)/asyncify-remove.json:
$(BUILD_WRAPPER)/asyncify-imports.json:
$(MKDIRP)
$(GENERATE_TS) async-callback-symbols $@

$(BUILD_WRAPPER)/Makefile.changed: Makefile
$(MKDIRP)
$(GENERATE_TS) hash $< $@
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"import": "./dist/ffi.js",
"require": "./dist/ffi.js"
},
"./wasm": "./dist/emscripten-module.wasm",
"./emscripten": {
"types": "./dist/emscripten-module.d.ts",
"import": "./dist/emscripten-module.js",
Expand Down
10 changes: 7 additions & 3 deletions packages/variant-quickjs-browser-debug-asyncify-wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ clean:
WASM: $(DIST)/emscripten-module.js $(DIST)/emscripten-module.d.ts
WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json

$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC)
$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS)

$(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts
echo '// Generated from $<' > $@
cat $< >> $@

$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) (BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $<

$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $<

Expand All @@ -130,3 +130,7 @@ $(BUILD_WRAPPER)/asyncify-remove.json:
$(BUILD_WRAPPER)/asyncify-imports.json:
$(MKDIRP)
$(GENERATE_TS) async-callback-symbols $@

$(BUILD_WRAPPER)/Makefile.changed: Makefile
$(MKDIRP)
$(GENERATE_TS) hash $< $@
10 changes: 7 additions & 3 deletions packages/variant-quickjs-browser-debug-sync-singlefile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ clean:
WASM: $(DIST)/emscripten-module.js $(DIST)/emscripten-module.d.ts
WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json

$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC)
$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS)

$(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts
echo '// Generated from $<' > $@
cat $< >> $@

$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) (BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $<

$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $<

Expand All @@ -126,3 +126,7 @@ $(BUILD_WRAPPER)/asyncify-remove.json:
$(BUILD_WRAPPER)/asyncify-imports.json:
$(MKDIRP)
$(GENERATE_TS) async-callback-symbols $@

$(BUILD_WRAPPER)/Makefile.changed: Makefile
$(MKDIRP)
$(GENERATE_TS) hash $< $@
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"import": "./dist/ffi.js",
"require": "./dist/ffi.js"
},
"./wasm": "./dist/emscripten-module.wasm",
"./emscripten": {
"types": "./dist/emscripten-module.d.ts",
"import": "./dist/emscripten-module.js",
Expand Down
10 changes: 7 additions & 3 deletions packages/variant-quickjs-browser-debug-sync-wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ clean:
WASM: $(DIST)/emscripten-module.js $(DIST)/emscripten-module.d.ts
WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json

$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC)
$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS)

$(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts
echo '// Generated from $<' > $@
cat $< >> $@

$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) (BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $<

$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $<

Expand All @@ -125,3 +125,7 @@ $(BUILD_WRAPPER)/asyncify-remove.json:
$(BUILD_WRAPPER)/asyncify-imports.json:
$(MKDIRP)
$(GENERATE_TS) async-callback-symbols $@

$(BUILD_WRAPPER)/Makefile.changed: Makefile
$(MKDIRP)
$(GENERATE_TS) hash $< $@
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ CFLAGS_WASM+=-s ASYNCIFY_IMPORTS=@$(BUILD_WRAPPER)/asyncify-imports.json
CFLAGS_WASM+=-lasync.js
CFLAGS_WASM+=-Oz
CFLAGS_WASM+=-flto
CFLAGS_WASM+=-s SINGLE_FILE=1
CFLAGS_WASM+=--closure 1
CFLAGS_WASM+=-s FILESYSTEM=0
CFLAGS_WASM+=-s SINGLE_FILE=1
Expand Down Expand Up @@ -102,19 +101,19 @@ clean:
WASM: $(DIST)/emscripten-module.js $(DIST)/emscripten-module.d.ts
WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json

$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC)
$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS)

$(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts
echo '// Generated from $<' > $@
cat $< >> $@

$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) (BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $<

$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $<

Expand All @@ -129,3 +128,7 @@ $(BUILD_WRAPPER)/asyncify-remove.json:
$(BUILD_WRAPPER)/asyncify-imports.json:
$(MKDIRP)
$(GENERATE_TS) async-callback-symbols $@

$(BUILD_WRAPPER)/Makefile.changed: Makefile
$(MKDIRP)
$(GENERATE_TS) hash $< $@
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Variant-specific Emscripten build flags:
"-lasync.js",
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s SINGLE_FILE=1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"import": "./dist/ffi.js",
"require": "./dist/ffi.js"
},
"./wasm": "./dist/emscripten-module.wasm",
"./emscripten": {
"types": "./dist/emscripten-module.d.ts",
"import": "./dist/emscripten-module.js",
Expand Down
11 changes: 7 additions & 4 deletions packages/variant-quickjs-browser-release-asyncify-wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ CFLAGS_WASM+=-s ASYNCIFY_IMPORTS=@$(BUILD_WRAPPER)/asyncify-imports.json
CFLAGS_WASM+=-lasync.js
CFLAGS_WASM+=-Oz
CFLAGS_WASM+=-flto
CFLAGS_WASM+=-s SINGLE_FILE=1
CFLAGS_WASM+=--closure 1
CFLAGS_WASM+=-s FILESYSTEM=0
CFLAGS_WASM+=-s EXPORT_ES6=1
Expand All @@ -101,19 +100,19 @@ clean:
WASM: $(DIST)/emscripten-module.js $(DIST)/emscripten-module.d.ts
WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json

$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC)
$(DIST)/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS)

$(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts
echo '// Generated from $<' > $@
cat $< >> $@

$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) (BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $<

$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC)
$(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(BUILD_WRAPPER)/Makefile.changed
$(MKDIRP)
$(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $<

Expand All @@ -128,3 +127,7 @@ $(BUILD_WRAPPER)/asyncify-remove.json:
$(BUILD_WRAPPER)/asyncify-imports.json:
$(MKDIRP)
$(GENERATE_TS) async-callback-symbols $@

$(BUILD_WRAPPER)/Makefile.changed: Makefile
$(MKDIRP)
$(GENERATE_TS) hash $< $@
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Variant-specific Emscripten build flags:
"-lasync.js",
"-Oz",
"-flto",
"-s SINGLE_FILE=1",
"--closure 1",
"-s FILESYSTEM=0",
"-s EXPORT_ES6=1",
Expand Down
Loading

0 comments on commit 1ce00ea

Please sign in to comment.