| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 the V8 project authors. All rights reserved. | 2 # Copyright 2016 the V8 project authors. All rights reserved. |
| 3 # Copyright 2015 The Chromium Authors. All rights reserved. | 3 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """MB - the Meta-Build wrapper around GYP and GN | 7 """MB - the Meta-Build wrapper around GYP and GN |
| 8 | 8 |
| 9 MB is a wrapper script for GYP and GN that can be used to generate build files | 9 MB is a wrapper script for GYP and GN that can be used to generate build files |
| 10 for sets of canned configurations and analyze them. | 10 for sets of canned configurations and analyze them. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 os.path.abspath(__file__)))) | 33 os.path.abspath(__file__)))) |
| 34 sys.path = [os.path.join(CHROMIUM_SRC_DIR, 'build')] + sys.path | 34 sys.path = [os.path.join(CHROMIUM_SRC_DIR, 'build')] + sys.path |
| 35 | 35 |
| 36 import gn_helpers | 36 import gn_helpers |
| 37 | 37 |
| 38 | 38 |
| 39 # We override this here as some legacy gyp scripts are still called through gn. | 39 # We override this here as some legacy gyp scripts are still called through gn. |
| 40 # They rely on the environment variable or otherwise use chromium's default of | 40 # They rely on the environment variable or otherwise use chromium's default of |
| 41 # 2015. | 41 # 2015. |
| 42 # TODO(machenbach): For switching to msvs 2015, simply remove this. | 42 # TODO(machenbach): For switching to msvs 2015, simply remove this. |
| 43 MSVS_VERSION = '2013' | 43 MSVS_VERSION = '2015' |
| 44 | 44 |
| 45 | 45 |
| 46 def main(args): | 46 def main(args): |
| 47 mbw = MetaBuildWrapper() | 47 mbw = MetaBuildWrapper() |
| 48 return mbw.Main(args) | 48 return mbw.Main(args) |
| 49 | 49 |
| 50 | 50 |
| 51 class MetaBuildWrapper(object): | 51 class MetaBuildWrapper(object): |
| 52 def __init__(self): | 52 def __init__(self): |
| 53 self.chromium_src_dir = CHROMIUM_SRC_DIR | 53 self.chromium_src_dir = CHROMIUM_SRC_DIR |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 # Then check to see if the arg contains any metacharacters other than | 1503 # Then check to see if the arg contains any metacharacters other than |
| 1504 # double quotes; if it does, quote everything (including the double | 1504 # double quotes; if it does, quote everything (including the double |
| 1505 # quotes) for safety. | 1505 # quotes) for safety. |
| 1506 if any(a in UNSAFE_FOR_CMD for a in arg): | 1506 if any(a in UNSAFE_FOR_CMD for a in arg): |
| 1507 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1507 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
| 1508 return arg | 1508 return arg |
| 1509 | 1509 |
| 1510 | 1510 |
| 1511 if __name__ == '__main__': | 1511 if __name__ == '__main__': |
| 1512 sys.exit(main(sys.argv[1:])) | 1512 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |