summaryrefslogtreecommitdiff
path: root/deps/uv/gyp_uv
diff options
context:
space:
mode:
authorPeter Bright <drpizza@quiscalusmexicanus.org>2011-08-13 19:17:47 +0100
committerRyan Dahl <ry@tinyclouds.org>2011-08-13 19:57:42 -0700
commit16788f461aedaca7eb7fc658b6b115ac8a3f5d62 (patch)
treeefae2cd898497c995bf774bd95fd7f8206eeae82 /deps/uv/gyp_uv
parenta5d90c435cb7af5fafe5b370e412e1b965d24114 (diff)
downloadnode-16788f461aedaca7eb7fc658b6b115ac8a3f5d62.tar.gz
Rename gyp files to produce useful solution names.
Hoist common settings into common.gypi. Restrict v8's common.gypi to v8 projects. Ensure v8 doesn't use /MP in debug builds. Add basic settings for other platforms. Make uv import common.gypi properly. Remove LTCG warning.
Diffstat (limited to 'deps/uv/gyp_uv')
-rw-r--r--deps/uv/gyp_uv26
1 files changed, 22 insertions, 4 deletions
diff --git a/deps/uv/gyp_uv b/deps/uv/gyp_uv
index 978fb906f..a7a9689c2 100644
--- a/deps/uv/gyp_uv
+++ b/deps/uv/gyp_uv
@@ -5,7 +5,7 @@ import shlex
import sys
script_dir = os.path.dirname(__file__)
-uv_root = os.path.abspath(script_dir)
+uv_root = os.path.normpath(script_dir)
sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib'))
import gyp
@@ -14,7 +14,6 @@ import gyp
# to be written.
output_dir = os.path.join(os.path.abspath(uv_root), 'out')
-
def run_gyp(args):
rc = gyp.main(args)
if rc != 0:
@@ -24,8 +23,23 @@ def run_gyp(args):
if __name__ == '__main__':
args = sys.argv[1:]
- args.append(os.path.join(script_dir, 'all.gyp'))
- args.append('-I' + os.path.join(script_dir, 'common.gypi'))
+ # GYP bug.
+ # On msvs it will crash if it gets an absolute path.
+ # On Mac/make it will crash if it doesn't get an absolute path.
+ if sys.platform == 'win32':
+ args.append(os.path.join(uv_root, 'uv.gyp'))
+ common_fn = os.path.join(uv_root, 'common.gypi')
+ options_fn = os.path.join(uv_root, 'options.gypi')
+ else:
+ args.append(os.path.join(os.path.abspath(uv_root), 'uv.gyp'))
+ common_fn = os.path.join(os.path.abspath(uv_root), 'common.gypi')
+ options_fn = os.path.join(os.path.abspath(uv_root), 'options.gypi')
+
+ if os.path.exists(common_fn):
+ args.extend(['-I', common_fn])
+
+ if os.path.exists(options_fn):
+ args.extend(['-I', options_fn])
args.append('--depth=' + uv_root)
@@ -38,5 +52,9 @@ if __name__ == '__main__':
# Tell make to write its output into the same dir
args.extend(['-Goutput_dir=' + output_dir])
+ args.append('-Dtarget_arch=ia32')
+ args.append('-Dcomponent=static_library')
+ args.append('-Dlibrary=static_library')
gyp_args = list(args)
+ print gyp_args
run_gyp(gyp_args)