diff options
author | Igor Zinkovsky <igorzi@microsoft.com> | 2011-07-07 13:54:30 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-07-08 17:44:58 -0700 |
commit | a58b6439de56f44a6dc3e34f4867524c94395246 (patch) | |
tree | bc9bd2d9e084f278f2982d9ff2bfcc30ea276e54 /wscript | |
parent | d38fac2230e9803231f080568588446556753c45 (diff) | |
download | nodejs-a58b6439de56f44a6dc3e34f4867524c94395246.tar.gz nodejs-a58b6439de56f44a6dc3e34f4867524c94395246.tar.bz2 nodejs-a58b6439de56f44a6dc3e34f4867524c94395246.zip |
Statically link in dependencies for node.exe
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -485,11 +485,10 @@ def configure(conf): conf.set_env_name('debug', debug_env) if (sys.platform.startswith("win32")): - # Static pthread - crashes - #conf.env.append_value('LINKFLAGS', '../deps/pthreads-w32/libpthreadGC2.a') - #debug_env.append_value('LINKFLAGS', '../deps/pthreads-w32/libpthreadGC2d.a') - # Pthread dll - conf.env.append_value('LIB', 'pthread.dll') + # Static pthread + conf.env.append_value('LINKFLAGS', '../deps/pthread-win32/libpthreadGC2.a') + debug_env.append_value('LINKFLAGS', '../deps/pthread-win32/libpthreadGC2d.a') + conf.env.append_value('CPPFLAGS', "-DPTW32_STATIC_LIB") # Configure debug variant conf.setenv('debug') @@ -625,6 +624,7 @@ def build_uv(bld): uv.env.env = dict(os.environ) uv.env.env['CC'] = sh_escape(bld.env['CC'][0]) uv.env.env['CXX'] = sh_escape(bld.env['CXX'][0]) + uv.env.env['CPPFLAGS'] = "-DPTW32_STATIC_LIB" t = join(bld.srcnode.abspath(bld.env_of_name("default")), uv.target) bld.env_of_name('default').append_value("LINKFLAGS_UV", t) @@ -883,6 +883,11 @@ def build(bld): bld.env.append_value('LINKFLAGS', '-Wl,--output-def,default/libnode.def') bld.install_files('${LIBDIR}', "build/default/libnode.*") + if (sys.platform.startswith("win32")): + # Static libgcc + bld.env.append_value('LINKFLAGS', '-static-libgcc') + bld.env.append_value('LINKFLAGS', '-static-libstdc++') + def subflags(program): x = { 'CCFLAGS' : " ".join(program.env["CCFLAGS"]).replace('"', '\\"') , 'CPPFLAGS' : " ".join(program.env["CPPFLAGS"]).replace('"', '\\"') |