| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Wrapper script for `gclient runhooks`. | 6 """Wrapper script for `gclient runhooks`. |
| 7 | 7 |
| 8 This is useful to set slave-dependent gyp defines. | 8 This is useful to set slave-dependent gyp defines. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 if options.use_goma: | 36 if options.use_goma: |
| 37 # Add goma-related GYP_DEFINES if requested. This is done in a slave script | 37 # Add goma-related GYP_DEFINES if requested. This is done in a slave script |
| 38 # because goma_dir is a slave-relative path and is not known to the master. | 38 # because goma_dir is a slave-relative path and is not known to the master. |
| 39 gyp_defines = os.environ.get('GYP_DEFINES', '') | 39 gyp_defines = os.environ.get('GYP_DEFINES', '') |
| 40 # pipes.quote() is necessary on Windows: http://crbug.com/340918#c7 - 11. | 40 # pipes.quote() is necessary on Windows: http://crbug.com/340918#c7 - 11. |
| 41 gyp_defines += ' use_goma=1 gomadir=' + pipes.quote(options.goma_dir) | 41 gyp_defines += ' use_goma=1 gomadir=' + pipes.quote(options.goma_dir) |
| 42 os.environ['GYP_DEFINES'] = gyp_defines | 42 os.environ['GYP_DEFINES'] = gyp_defines |
| 43 print 'Changed GYP_DEFINES to', os.environ['GYP_DEFINES'] | 43 print 'Changed GYP_DEFINES to', os.environ['GYP_DEFINES'] |
| 44 | 44 |
| 45 return chromium_utils.RunCommand(['gclient', 'runhooks']) | 45 return chromium_utils.RunCommand([chromium_utils.GetGClientCommand(), |
| 46 'runhooks']) |
| 46 | 47 |
| 47 | 48 |
| 48 if '__main__' == __name__: | 49 if '__main__' == __name__: |
| 49 sys.exit(main()) | 50 sys.exit(main()) |
| OLD | NEW |