From 8152f9cff221b1e10f0e0c2f49694e4571cb235e Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Sep 2009 14:15:29 +0200 Subject: [PATCH] Revert static library build. Not necessary to build dll modules after all. --- src/main.cc | 7 ------- src/node.cc | 3 ++- src/node.h | 1 - wscript | 47 +++++++++++++---------------------------------- 4 files changed, 15 insertions(+), 43 deletions(-) delete mode 100644 src/main.cc diff --git a/src/main.cc b/src/main.cc deleted file mode 100644 index 5e2f53773b..0000000000 --- a/src/main.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include "node.h" - -int -main (int argc, char *argv[]) -{ - return node::start(argc, argv); -} diff --git a/src/node.cc b/src/node.cc index c138580145..4fe15a8604 100644 --- a/src/node.cc +++ b/src/node.cc @@ -142,6 +142,7 @@ node_dlopen (const v8::Arguments& args) Local target = args[1]->ToObject(); void *handle = dlopen(*filename, RTLD_LAZY); + if (handle == NULL) { Local exception = Exception::Error(String::New(dlerror())); return ThrowException(exception); @@ -370,7 +371,7 @@ ParseArgs (int *argc, char **argv) } int -node::start (int argc, char *argv[]) +main(int argc, char *argv[]) { evcom_ignore_sigpipe(); ev_default_loop(EVFLAG_AUTO); // initialize the default ev loop. diff --git a/src/node.h b/src/node.h index 6701fa6f4e..de1a547fab 100644 --- a/src/node.h +++ b/src/node.h @@ -31,7 +31,6 @@ do { \ enum encoding {ASCII, UTF8, RAW}; enum encoding ParseEncoding (v8::Handle encoding_v); void FatalException (v8::TryCatch &try_catch); -int start (int argc, char *argv[]); } // namespace node #endif // node_h diff --git a/wscript b/wscript index 93e82c2b6c..464b613e47 100644 --- a/wscript +++ b/wscript @@ -61,13 +61,14 @@ def configure(conf): conf.env["USE_DEBUG"] = Options.options.debug conf.check(lib='dl', uselib_store='DL') + conf.env.append_value("CCFLAGS", "-rdynamic") conf.env.append_value("LINKFLAGS_DL", "-rdynamic") - if Options.options.debug: - conf.check(lib='profiler', uselib_store='PROFILER') + #if Options.options.debug: + # conf.check(lib='profiler', uselib_store='PROFILER') - if Options.options.efence: - conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE') + #if Options.options.efence: + # conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE') if sys.platform.startswith("freebsd"): if not conf.check(lib="execinfo", libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"): @@ -234,10 +235,10 @@ def build(bld): native_cc.clone("debug") ### node lib - libnode = bld.new_task_gen("cxx", "shlib") - libnode.name = "node" - libnode.target = "node" - libnode.source = """ + node = bld.new_task_gen("cxx", "program") + node.name = "node" + node.target = "node" + node.source = """ src/node.cc src/events.cc src/http.cc @@ -249,7 +250,7 @@ def build(bld): src/child_process.cc src/constants.cc """ - libnode.includes = """ + node.includes = """ src/ deps/v8/include deps/libev @@ -259,25 +260,9 @@ def build(bld): deps/http_parser deps/coupling """ - libnode.uselib_local = "evcom ev eio http_parser coupling" - libnode.uselib = "UDNS V8 EXECINFO PROFILER EFENCE DL" - libnode.install_path = '${PREFIX}/lib' - - - libnode_static = bld.new_task_gen("cxx", "staticlib") - libnode_static.name = "node-static" - libnode_static.target = libnode.target - libnode_static.source = libnode.source - libnode_static.includes = libnode.includes - libnode_static.uselib_local = libnode.uselib_local - libnode_static.uselib = libnode.uselib - - ### node - node = bld.new_task_gen("cxx", "program") - node.target = 'node' - node.source = "src/main.cc" - node.includes = libnode.includes - node.uselib_local = "node-static" + node.uselib_local = "evcom ev eio http_parser coupling" + node.uselib = "UDNS V8 EXECINFO DL" + node.install_path = '${PREFIX}/lib' node.install_path = '${PREFIX}/bin' node.chmod = 0755 @@ -307,12 +292,6 @@ def build(bld): if bld.env["USE_DEBUG"]: node_g = node.clone("debug") node_g.target = "node_g" - - libnode_g = libnode.clone("debug") - libnode_g.target = "node_g" - - libnode_static_g = libnode_static.clone("debug") - libnode_static_g.target = "node_g" node_version_g = node_version.clone("debug") node_version_g.dict = subflags(node_g)