OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """MB - the Meta-Build wrapper around GYP and GN | 6 """MB - the Meta-Build wrapper around GYP and GN |
7 | 7 |
8 MB is a wrapper script for GYP and GN that can be used to generate build files | 8 MB is a wrapper script for GYP and GN that can be used to generate build files |
9 for sets of canned configurations and analyze them. | 9 for sets of canned configurations and analyze them. |
10 """ | 10 """ |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
879 runtime_deps_path = self.ToAbsPath(build_dir, r) | 879 runtime_deps_path = self.ToAbsPath(build_dir, r) |
880 if self.Exists(runtime_deps_path): | 880 if self.Exists(runtime_deps_path): |
881 break | 881 break |
882 else: | 882 else: |
883 raise MBErr('did not generate any of %s' % | 883 raise MBErr('did not generate any of %s' % |
884 ', '.join(runtime_deps_targets)) | 884 ', '.join(runtime_deps_targets)) |
885 | 885 |
886 command, extra_files = self.GetIsolateCommand(target, vals) | 886 command, extra_files = self.GetIsolateCommand(target, vals) |
887 | 887 |
888 runtime_deps = self.ReadFile(runtime_deps_path).splitlines() | 888 runtime_deps = self.ReadFile(runtime_deps_path).splitlines() |
889 if android: | |
jbudorick
2017/07/26 18:39:56
I'm concerned about hacking this into mb.py rather
agrieve
2017/07/26 19:03:57
In GN, "runtime_deps" are the things required to r
| |
890 unstripped_libs = [] | |
jbudorick
2017/07/26 21:55:53
one caveat: please add a TODO here with the bug nu
BigBossZhiling
2017/07/26 22:11:54
Done.
| |
891 for f in runtime_deps: | |
892 if f.endswith('.so'): | |
893 if os.path.isfile(self.PathJoin(self.ToAbsPath(build_dir), | |
894 'lib.unstripped', | |
895 os.path.basename(f))): | |
896 unstripped_libs.append('lib.unstripped/%s' % os.path.basename(f)) | |
897 runtime_deps.extend(unstripped_libs) | |
889 | 898 |
890 self.WriteIsolateFiles(build_dir, command, target, runtime_deps, | 899 self.WriteIsolateFiles(build_dir, command, target, runtime_deps, |
891 extra_files) | 900 extra_files) |
892 | 901 |
893 return 0 | 902 return 0 |
894 | 903 |
895 def RunGNIsolate(self, vals): | 904 def RunGNIsolate(self, vals): |
896 target = self.args.target[0] | 905 target = self.args.target[0] |
897 isolate_map = self.ReadIsolateMap() | 906 isolate_map = self.ReadIsolateMap() |
898 err, labels = self.MapTargetsToLabels(isolate_map, [target]) | 907 err, labels = self.MapTargetsToLabels(isolate_map, [target]) |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1543 # Then check to see if the arg contains any metacharacters other than | 1552 # Then check to see if the arg contains any metacharacters other than |
1544 # double quotes; if it does, quote everything (including the double | 1553 # double quotes; if it does, quote everything (including the double |
1545 # quotes) for safety. | 1554 # quotes) for safety. |
1546 if any(a in UNSAFE_FOR_CMD for a in arg): | 1555 if any(a in UNSAFE_FOR_CMD for a in arg): |
1547 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1556 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
1548 return arg | 1557 return arg |
1549 | 1558 |
1550 | 1559 |
1551 if __name__ == '__main__': | 1560 if __name__ == '__main__': |
1552 sys.exit(main(sys.argv[1:])) | 1561 sys.exit(main(sys.argv[1:])) |
OLD | NEW |