diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-01-26 18:24:36 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-02-04 10:49:08 +0100 |
commit | 3d51e116a84ee168975bcee8377e9156f77e2731 (patch) | |
tree | 5a9799423e496c8c77f3e2edd6ae334dbf823da4 /gyp/link.py | |
parent | 46553ff00c15414f4087ba9195fed7eba340fc13 (diff) | |
download | qtlocation-mapboxgl-3d51e116a84ee168975bcee8377e9156f77e2731.tar.gz |
use fake linker for merging the standalone static library
Diffstat (limited to 'gyp/link.py')
-rwxr-xr-x | gyp/link.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gyp/link.py b/gyp/link.py new file mode 100755 index 0000000000..cab61aa9e6 --- /dev/null +++ b/gyp/link.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +import sys +from merge_static_libs import MergeLibs + +args = sys.argv[1:] + +out_lib = '' +in_libs = [] +flags = [] + +i = 0 +l = len(args) +while i < l: + arg = args[i] + + if arg[0:2] == '-l': + flags.append(arg) + elif arg == '-arch': + i += 1 + elif arg == '-framework': + i += 1 + flags.append(arg + ' ' + args[i]) + elif arg == '-o': + i += 1 + out_lib = args[i] + elif arg[0] != '-': + in_libs.append(arg) + else: + print 'Ignored linker directive: ' + arg + + i += 1 + +MergeLibs(in_libs, out_lib) |