Fix settings for building nodejs tests.
Removed the `-node` command line flag. Instead one has to use `-v8 -DBUILDING_NODE_EXTENSION=1`.
This commit is contained in:
parent
be35d94fdb
commit
001f38c6a9
5 changed files with 28 additions and 32 deletions
|
|
@ -88,7 +88,7 @@ ifeq ("node",$(JSENGINE))
|
||||||
__setup = \
|
__setup = \
|
||||||
if [ ! -f $(srcdir)/$*/binding.gyp ]; then \
|
if [ ! -f $(srcdir)/$*/binding.gyp ]; then \
|
||||||
sh ./setup_test.sh $*; \
|
sh ./setup_test.sh $*; \
|
||||||
$(SWIG) -c++ -javascript -node -o $*/$*_wrap.cxx ../$*.i; \
|
$(SWIG) -c++ -javascript -v8 -DBUILDING_NODE_EXTENSION=1 -I$(top_srcdir)/Examples/test-suite -includeall -o $*/$*_wrap.cxx ../$*.i; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nodejs_swig_and_compile = \
|
nodejs_swig_and_compile = \
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@
|
||||||
"target_name": "$testcase",
|
"target_name": "$testcase",
|
||||||
"sources":[ "$testcase_wrap.cxx" ],
|
"sources":[ "$testcase_wrap.cxx" ],
|
||||||
"include_dirs": ["../.."],
|
"include_dirs": ["../.."],
|
||||||
|
'defines': [
|
||||||
|
'BUILDING_NODE_EXTENSION=1',
|
||||||
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="mac"',
|
['OS=="mac"',
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*****************************************************************************/
|
/* ----------------------------------------------------------------------------
|
||||||
/* Errors and exceptions
|
* Errors and exceptions
|
||||||
/*
|
*
|
||||||
/*****************************************************************************/
|
* ---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#define SWIG_Error(code, msg) SWIG_JSC_exception(context, exception, code, msg)
|
#define SWIG_Error(code, msg) SWIG_JSC_exception(context, exception, code, msg)
|
||||||
#define SWIG_exception(code, msg) SWIG_JSC_exception(context, exception, code, msg)
|
#define SWIG_exception(code, msg) SWIG_JSC_exception(context, exception, code, msg)
|
||||||
|
|
@ -17,10 +17,10 @@ void SWIG_JSC_exception(JSContextRef context, JSValueRef *exception, int code, c
|
||||||
SWIG_Javascript_Raise(context, exception, msg);
|
SWIG_Javascript_Raise(context, exception, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/* ----------------------------------------------------------------------------
|
||||||
/* The parent class of all Proxies
|
* The parent class of all Proxies
|
||||||
/*
|
*
|
||||||
/*****************************************************************************/
|
* ---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool swigCMemOwn;
|
bool swigCMemOwn;
|
||||||
|
|
@ -167,10 +167,10 @@ JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_in
|
||||||
#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_JSC_ConvertInstancePtr(context, obj, pptr, type, flags)
|
#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_JSC_ConvertInstancePtr(context, obj, pptr, type, flags)
|
||||||
#define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_JSC_NewPointerObj(context, thisvalue, type, flags)
|
#define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_JSC_NewPointerObj(context, thisvalue, type, flags)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/* ----------------------------------------------------------------------------
|
||||||
/* A class for packed data
|
* A class for packed data
|
||||||
/*
|
*
|
||||||
/*****************************************************************************/
|
* ---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
void *data;
|
void *data;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/* ---------------------------------------------------------------------------*/
|
/* ---------------------------------------------------------------------------
|
||||||
/* Error handling
|
* Error handling
|
||||||
/*
|
*
|
||||||
/* ---------------------------------------------------------------------------*/
|
* ---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#define SWIG_Error(code, msg) SWIGV8_ErrorHandler.error(code, msg)
|
#define SWIG_Error(code, msg) SWIGV8_ErrorHandler.error(code, msg)
|
||||||
#define SWIG_exception(code, msg) SWIGV8_ErrorHandler.error(code, msg)
|
#define SWIG_exception(code, msg) SWIGV8_ErrorHandler.error(code, msg)
|
||||||
|
|
@ -64,10 +64,10 @@ typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------*/
|
/* ---------------------------------------------------------------------------
|
||||||
/* Basic Proxy object
|
* Basic Proxy object
|
||||||
/*
|
*
|
||||||
/* ---------------------------------------------------------------------------*/
|
* ---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// Note: to trigger the v8 gc more often one can tell v8 about the memory consumption
|
// Note: to trigger the v8 gc more often one can tell v8 about the memory consumption
|
||||||
// TODO: we could add a v8 specific parameter to control this value
|
// TODO: we could add a v8 specific parameter to control this value
|
||||||
|
|
@ -323,10 +323,10 @@ fail:
|
||||||
SWIGV8_RETURN(v8::Undefined());
|
SWIGV8_RETURN(v8::Undefined());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------*/
|
/* ---------------------------------------------------------------------------
|
||||||
/* PackedData object
|
* PackedData object
|
||||||
/*
|
*
|
||||||
/* ---------------------------------------------------------------------------*/
|
* ---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class SwigV8PackedData {
|
class SwigV8PackedData {
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -532,11 +532,6 @@ void JAVASCRIPT::main(int argc, char *argv[]) {
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
mode = JSEmitter::V8;
|
mode = JSEmitter::V8;
|
||||||
SWIG_library_directory("javascript/v8");
|
SWIG_library_directory("javascript/v8");
|
||||||
} else if (strcmp(argv[i], "-node") == 0) {
|
|
||||||
Swig_mark_arg(i);
|
|
||||||
mode = JSEmitter::V8;
|
|
||||||
SWIG_library_directory("javascript/v8");
|
|
||||||
Preprocessor_define("BUILDING_NODE_EXTENSION 1", 0);
|
|
||||||
} else if (strcmp(argv[i], "-jsc") == 0) {
|
} else if (strcmp(argv[i], "-jsc") == 0) {
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
mode = JSEmitter::JavascriptCore;
|
mode = JSEmitter::JavascriptCore;
|
||||||
|
|
@ -544,8 +539,6 @@ void JAVASCRIPT::main(int argc, char *argv[]) {
|
||||||
} else if (strcmp(argv[i], "-debug-codetemplates") == 0) {
|
} else if (strcmp(argv[i], "-debug-codetemplates") == 0) {
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
js_template_enable_debug = true;
|
js_template_enable_debug = true;
|
||||||
} else if (strcmp(argv[i], "-no-moduleobject") == 0) {
|
|
||||||
Swig_mark_arg(i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue