Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: site_scons/site_tools/chromium_builders.py

Issue 42650: Update Linux gyp build to import and propagate external environment... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 else: 139 else:
140 result = env.ComponentTestProgram(target, source, *args, **kw) 140 result = env.ComponentTestProgram(target, source, *args, **kw)
141 if env.get('INCREMENTAL'): 141 if env.get('INCREMENTAL'):
142 env.Precious(*result) 142 env.Precious(*result)
143 return result 143 return result
144 144
145 def ChromeLibrary(env, target, source, *args, **kw): 145 def ChromeLibrary(env, target, source, *args, **kw):
146 source = compilable_files(env, source) 146 source = compilable_files(env, source)
147 if env.get('_GYP'): 147 if env.get('_GYP'):
148 lib = env.Library(target, source, *args, **kw) 148 lib = env.Library(target, source, *args, **kw)
149 result = env.Install('$DESTINATION_ROOT/$BUILD_TYPE/lib', lib) 149 result = env.Install('$LIB_DIR', lib)
150 else: 150 else:
151 result = env.ComponentLibrary(target, source, *args, **kw) 151 result = env.ComponentLibrary(target, source, *args, **kw)
152 return result 152 return result
153 153
154 def ChromeLoadableModule(env, target, source, *args, **kw): 154 def ChromeLoadableModule(env, target, source, *args, **kw):
155 source = compilable_files(env, source) 155 source = compilable_files(env, source)
156 if env.get('_GYP'): 156 if env.get('_GYP'):
157 result = env.LoadableModule(target, source, *args, **kw) 157 result = env.LoadableModule(target, source, *args, **kw)
158 else: 158 else:
159 kw['COMPONENT_STATIC'] = True 159 kw['COMPONENT_STATIC'] = True
160 result = env.LoadableModule(target, source, *args, **kw) 160 result = env.LoadableModule(target, source, *args, **kw)
161 return result 161 return result
162 162
163 def ChromeStaticLibrary(env, target, source, *args, **kw): 163 def ChromeStaticLibrary(env, target, source, *args, **kw):
164 source = compilable_files(env, source) 164 source = compilable_files(env, source)
165 if env.get('_GYP'): 165 if env.get('_GYP'):
166 lib = env.StaticLibrary(target, source, *args, **kw) 166 lib = env.StaticLibrary(target, source, *args, **kw)
167 result = env.Install('$DESTINATION_ROOT/$BUILD_TYPE/lib', lib) 167 result = env.Install('$LIB_DIR', lib)
168 else: 168 else:
169 kw['COMPONENT_STATIC'] = True 169 kw['COMPONENT_STATIC'] = True
170 result = env.ComponentLibrary(target, source, *args, **kw) 170 result = env.ComponentLibrary(target, source, *args, **kw)
171 return result 171 return result
172 172
173 def ChromeSharedLibrary(env, target, source, *args, **kw): 173 def ChromeSharedLibrary(env, target, source, *args, **kw):
174 source = compilable_files(env, source) 174 source = compilable_files(env, source)
175 if env.get('_GYP'): 175 if env.get('_GYP'):
176 lib = env.SharedLibrary(target, source, *args, **kw) 176 lib = env.SharedLibrary(target, source, *args, **kw)
177 result = env.Install('$DESTINATION_ROOT/$BUILD_TYPE/lib', lib) 177 result = env.Install('$LIB_DIR', lib)
178 else: 178 else:
179 kw['COMPONENT_STATIC'] = False 179 kw['COMPONENT_STATIC'] = False
180 result = [env.ComponentLibrary(target, source, *args, **kw)[0]] 180 result = [env.ComponentLibrary(target, source, *args, **kw)[0]]
181 if env.get('INCREMENTAL'): 181 if env.get('INCREMENTAL'):
182 env.Precious(result) 182 env.Precious(result)
183 return result 183 return result
184 184
185 def ChromeObject(env, *args, **kw): 185 def ChromeObject(env, *args, **kw):
186 if env.get('_GYP'): 186 if env.get('_GYP'):
187 result = env.Object(target, source, *args, **kw) 187 result = env.Object(target, source, *args, **kw)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 env.AddMethod(ChromeStaticLibrary) 234 env.AddMethod(ChromeStaticLibrary)
235 env.AddMethod(ChromeSharedLibrary) 235 env.AddMethod(ChromeSharedLibrary)
236 env.AddMethod(ChromeObject) 236 env.AddMethod(ChromeObject)
237 env.AddMethod(ChromeMSVSFolder) 237 env.AddMethod(ChromeMSVSFolder)
238 env.AddMethod(ChromeMSVSProject) 238 env.AddMethod(ChromeMSVSProject)
239 env.AddMethod(ChromeMSVSSolution) 239 env.AddMethod(ChromeMSVSSolution)
240 240
241 env.AddMethod(FilterOut) 241 env.AddMethod(FilterOut)
242 242
243 # Add the grit tool to the base environment because we use this a lot. 243 # Add the grit tool to the base environment because we use this a lot.
244 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) 244 sys.path.append(env.Dir('$SRC_DIR/tools/grit').abspath)
245 env.Tool('scons', toolpath=[env.Dir('$CHROME_SRC_DIR/tools/grit/grit')]) 245 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/grit/grit')])
246 246
247 # Add the repack python script tool that we use in multiple places. 247 # Add the repack python script tool that we use in multiple places.
248 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/data_pack').abspath) 248 sys.path.append(env.Dir('$SRC_DIR/tools/data_pack').abspath)
249 env.Tool('scons', toolpath=[env.Dir('$CHROME_SRC_DIR/tools/data_pack/')]) 249 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/data_pack/')])
250 250
251 def exists(env): 251 def exists(env):
252 return True 252 return True
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698