summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorIgor Zinkovsky <igorzi@microsoft.com>2011-07-07 13:54:30 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-07-08 17:44:58 -0700
commita58b6439de56f44a6dc3e34f4867524c94395246 (patch)
treebc9bd2d9e084f278f2982d9ff2bfcc30ea276e54 /wscript
parentd38fac2230e9803231f080568588446556753c45 (diff)
downloadnodejs-a58b6439de56f44a6dc3e34f4867524c94395246.tar.gz
nodejs-a58b6439de56f44a6dc3e34f4867524c94395246.tar.bz2
nodejs-a58b6439de56f44a6dc3e34f4867524c94395246.zip
Statically link in dependencies for node.exe
Diffstat (limited to 'wscript')
-rw-r--r--wscript15
1 files changed, 10 insertions, 5 deletions
diff --git a/wscript b/wscript
index cd1b715d9..e822d026a 100644
--- a/wscript
+++ b/wscript
@@ -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('"', '\\"')