OLD | NEW |
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """ | 5 """ |
6 Tool module for adding, to a construction environment, Chromium-specific | 6 Tool module for adding, to a construction environment, Chromium-specific |
7 wrappers around Hammer builders. This gives us a central place for any | 7 wrappers around Hammer builders. This gives us a central place for any |
8 customization we need to make to the different things we build. | 8 customization we need to make to the different things we build. |
9 """ | 9 """ |
10 | 10 |
11 def generate(env): | 11 def generate(env): |
12 def ChromeProgram(env, *args, **kw): | 12 def ChromeProgram(env, *args, **kw): |
13 return env.ComponentProgram(*args, **kw) | 13 result = env.ComponentProgram(*args, **kw) |
| 14 if env.get('INCREMENTAL'): |
| 15 env.Precious(result) |
| 16 return result |
14 env.AddMethod(ChromeProgram) | 17 env.AddMethod(ChromeProgram) |
15 | 18 |
16 def ChromeTestProgram(env, *args, **kw): | 19 def ChromeTestProgram(env, *args, **kw): |
17 return env.ComponentTestProgram(*args, **kw) | 20 result = env.ComponentTestProgram(*args, **kw) |
| 21 if env.get('INCREMENTAL'): |
| 22 env.Precious(*result) |
| 23 return result |
18 env.AddMethod(ChromeTestProgram) | 24 env.AddMethod(ChromeTestProgram) |
19 | 25 |
20 def ChromeStaticLibrary(env, *args, **kw): | 26 def ChromeStaticLibrary(env, *args, **kw): |
21 kw['COMPONENT_STATIC'] = True | 27 kw['COMPONENT_STATIC'] = True |
22 return env.ComponentLibrary(*args, **kw) | 28 return env.ComponentLibrary(*args, **kw) |
23 env.AddMethod(ChromeStaticLibrary) | 29 env.AddMethod(ChromeStaticLibrary) |
24 | 30 |
25 def ChromeSharedLibrary(env, *args, **kw): | 31 def ChromeSharedLibrary(env, *args, **kw): |
26 kw['COMPONENT_STATIC'] = False | 32 kw['COMPONENT_STATIC'] = False |
27 return [env.ComponentLibrary(*args, **kw)[0]] | 33 result = [env.ComponentLibrary(*args, **kw)[0]] |
| 34 if env.get('INCREMENTAL'): |
| 35 env.Precious(result) |
| 36 return result |
28 env.AddMethod(ChromeSharedLibrary) | 37 env.AddMethod(ChromeSharedLibrary) |
29 | 38 |
30 def ChromeObject(env, *args, **kw): | 39 def ChromeObject(env, *args, **kw): |
31 return env.ComponentObject(*args, **kw) | 40 return env.ComponentObject(*args, **kw) |
32 env.AddMethod(ChromeObject) | 41 env.AddMethod(ChromeObject) |
33 | 42 |
34 def exists(env): | 43 def exists(env): |
35 return True | 44 return True |
OLD | NEW |