Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed31b42

Browse files
Enable release build
1 parent b8d4077 commit ed31b42

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

IntegrationTests/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
2+
CONFIGURATION ?= debug
23

34
.PHONY: JavaScriptKitExec
45
JavaScriptKitExec:
56
cd JavaScriptKitExec && \
6-
swift build --triple wasm32-unknown-wasi
7+
swift build --triple wasm32-unknown-wasi \
8+
--configuration $(CONFIGURATION)
79

810
dist/JavaScriptKitExec.wasm: JavaScriptKitExec
911
mkdir -p dist
10-
cp ./JavaScriptKitExec/.build/debug/JavaScriptKitExec $@
12+
cp ./JavaScriptKitExec/.build/$(CONFIGURATION)/JavaScriptKitExec $@
1113

1214
node_modules:
1315
npm install

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ build:
1111

1212
.PHONY: test
1313
test:
14-
cd IntegrationTests && make test
14+
cd IntegrationTests && \
15+
CONFIGURATION=debug make test && \
16+
CONFIGURATION=release make test
1517

Sources/JavaScriptKit/JSObject.swift

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class JSObjectRef: Equatable {
4242
setJSValue(this: self, index: Int32(index), value: value)
4343
}
4444

45+
static let _JS_Predef_Value_Global: UInt32 = 0
4546
public static let global = JSObjectRef(id: _JS_Predef_Value_Global)
4647

4748
deinit { _destroy_ref(id) }

Sources/_CJavaScriptKit/include/_CJavaScriptKit.h

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ typedef struct {
2828
JavaScriptPayload3 payload3;
2929
} RawJSValue;
3030

31-
32-
const unsigned int _JS_Predef_Value_Global = 0;
33-
3431
__attribute__((
3532
__import_module__("javascript_kit"),
3633
__import_name__("swjs_set_prop")

0 commit comments

Comments
 (0)