Skip to content

Commit 5a87628

Browse files
committed
no engine builds
1 parent 24316e8 commit 5a87628

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

NativeScript/ffi/CFunction.mm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
#include "ObjCBridge.h"
44
#include "ffi/NativeScriptException.h"
55
#include "ffi/Tasks.h"
6+
#ifdef ENABLE_JS_ENGINE
67
#include "jsr.h"
8+
#endif
79

810
namespace nativescript {
911

@@ -77,8 +79,8 @@
7779
}
7880
}
7981

80-
81-
if (strcmp(name, "UIApplicationMain") == 0 || strcmp(name, "NSApplicationMain") == 0) {
82+
#ifdef ENABLE_JS_ENGINE
83+
if (strcmp(name, "UIApplicationMain") == 0 || strcmp(name, "NSApplicationMain") == 0) {
8284
void **avaluesPtr = new void*[cif->argc];
8385
memcpy(avaluesPtr, avalues, cif->argc * sizeof(void*));
8486

@@ -101,6 +103,7 @@
101103

102104
return nullptr;
103105
}
106+
#endif
104107

105108
@try {
106109
ffi_call(&cif->cif, FFI_FN(func->fnptr), rvalue, avalues);

NativeScript/ffi/Closure.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include "ffi/NativeScriptException.h"
99
#include "js_native_api.h"
1010
#include "js_native_api_types.h"
11+
#ifdef ENABLE_JS_ENGINE
1112
#include "jsr.h"
13+
#endif
1214
#include "node_api_util.h"
1315
#include "objc/message.h"
1416

@@ -23,7 +25,9 @@ inline void JSCallbackInner(Closure* closure, napi_value func, napi_value thisAr
2325
size_t argc, bool* done, void* ret) {
2426
napi_env env = closure->env;
2527

28+
#ifdef ENABLE_JS_ENGINE
2629
NapiScope scope(env);
30+
#endif
2731

2832
napi_value result;
2933

NativeScript/ffi/NativeScriptException.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
#include <sstream>
44
#include "js_native_api.h"
55
#include "js_native_api_types.h"
6+
#ifdef ENABLE_JS_ENGINE
67
#include "jsr.h"
8+
#endif
79
#include "native_api_util.h"
810
#include "runtime/Runtime.h"
911

@@ -48,7 +50,9 @@
4850
}
4951

5052
void NativeScriptException::OnUncaughtError(napi_env env, napi_value error) {
53+
#ifdef ENABLE_JS_ENGINE
5154
NapiScope scope(env);
55+
#endif
5256

5357
std::stringstream fullMessageStream;
5458

build_nativescript.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ for arg in $@; do
5656
--jsc) TARGET_ENGINE=jsc ;;
5757
--embed-metadata) EMBED_METADATA=true ;;
5858
--hermes) TARGET_ENGINE=hermes ;;
59+
--no-engine) TARGET_ENGINE=none ;;
5960
*) ;;
6061
esac
6162
done

0 commit comments

Comments
 (0)