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 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 env.Precious(result) | 66 env.Precious(result) |
67 return result | 67 return result |
68 | 68 |
69 def ChromeTestProgram(env, target, source, *args, **kw): | 69 def ChromeTestProgram(env, target, source, *args, **kw): |
70 source = compilable_files(source) | 70 source = compilable_files(source) |
71 result = env.ComponentTestProgram(target, source, *args, **kw) | 71 result = env.ComponentTestProgram(target, source, *args, **kw) |
72 if env.get('INCREMENTAL'): | 72 if env.get('INCREMENTAL'): |
73 env.Precious(*result) | 73 env.Precious(*result) |
74 return result | 74 return result |
75 | 75 |
| 76 def ChromeLibrary(env, target, source, *args, **kw): |
| 77 source = compilable_files(source) |
| 78 return env.ComponentLibrary(target, source, *args, **kw) |
| 79 |
76 def ChromeStaticLibrary(env, target, source, *args, **kw): | 80 def ChromeStaticLibrary(env, target, source, *args, **kw): |
77 source = compilable_files(source) | 81 source = compilable_files(source) |
78 kw['COMPONENT_STATIC'] = True | 82 kw['COMPONENT_STATIC'] = True |
79 return env.ComponentLibrary(target, source, *args, **kw) | 83 return env.ComponentLibrary(target, source, *args, **kw) |
80 | 84 |
81 def ChromeSharedLibrary(env, target, source, *args, **kw): | 85 def ChromeSharedLibrary(env, target, source, *args, **kw): |
82 source = compilable_files(source) | 86 source = compilable_files(source) |
83 kw['COMPONENT_STATIC'] = False | 87 kw['COMPONENT_STATIC'] = False |
84 result = [env.ComponentLibrary(target, source, *args, **kw)[0]] | 88 result = [env.ComponentLibrary(target, source, *args, **kw)[0]] |
85 if env.get('INCREMENTAL'): | 89 if env.get('INCREMENTAL'): |
(...skipping 14 matching lines...) Expand all Loading... |
100 return env.MSVSProject(*args, **kw) | 104 return env.MSVSProject(*args, **kw) |
101 | 105 |
102 def ChromeMSVSSolution(env, *args, **kw): | 106 def ChromeMSVSSolution(env, *args, **kw): |
103 if not env.Bit('msvs'): | 107 if not env.Bit('msvs'): |
104 return Null() | 108 return Null() |
105 return env.MSVSSolution(*args, **kw) | 109 return env.MSVSSolution(*args, **kw) |
106 | 110 |
107 def generate(env): | 111 def generate(env): |
108 env.AddMethod(ChromeProgram) | 112 env.AddMethod(ChromeProgram) |
109 env.AddMethod(ChromeTestProgram) | 113 env.AddMethod(ChromeTestProgram) |
| 114 env.AddMethod(ChromeLibrary) |
110 env.AddMethod(ChromeStaticLibrary) | 115 env.AddMethod(ChromeStaticLibrary) |
111 env.AddMethod(ChromeSharedLibrary) | 116 env.AddMethod(ChromeSharedLibrary) |
112 env.AddMethod(ChromeObject) | 117 env.AddMethod(ChromeObject) |
113 env.AddMethod(ChromeMSVSFolder) | 118 env.AddMethod(ChromeMSVSFolder) |
114 env.AddMethod(ChromeMSVSProject) | 119 env.AddMethod(ChromeMSVSProject) |
115 env.AddMethod(ChromeMSVSSolution) | 120 env.AddMethod(ChromeMSVSSolution) |
116 | 121 |
117 def exists(env): | 122 def exists(env): |
118 return True | 123 return True |
OLD | NEW |