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

Side by Side Diff: third_party/scons/scons-local/SCons/Tool/mingw.py

Issue 20025: Update SCons to latest checkpoint release, 1.2.0.d20090113.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
OLDNEW
1 """SCons.Tool.gcc 1 """SCons.Tool.gcc
2 2
3 Tool-specific initialization for MinGW (http://www.mingw.org/) 3 Tool-specific initialization for MinGW (http://www.mingw.org/)
4 4
5 There normally shouldn't be any need to import this module directly. 5 There normally shouldn't be any need to import this module directly.
6 It will usually be imported through the generic SCons.Tool.Tool() 6 It will usually be imported through the generic SCons.Tool.Tool()
7 selection method. 7 selection method.
8 8
9 """ 9 """
10 10
11 # 11 #
12 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundat ion 12 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons F oundation
13 # 13 #
14 # Permission is hereby granted, free of charge, to any person obtaining 14 # Permission is hereby granted, free of charge, to any person obtaining
15 # a copy of this software and associated documentation files (the 15 # a copy of this software and associated documentation files (the
16 # "Software"), to deal in the Software without restriction, including 16 # "Software"), to deal in the Software without restriction, including
17 # without limitation the rights to use, copy, modify, merge, publish, 17 # without limitation the rights to use, copy, modify, merge, publish,
18 # distribute, sublicense, and/or sell copies of the Software, and to 18 # distribute, sublicense, and/or sell copies of the Software, and to
19 # permit persons to whom the Software is furnished to do so, subject to 19 # permit persons to whom the Software is furnished to do so, subject to
20 # the following conditions: 20 # the following conditions:
21 # 21 #
22 # The above copyright notice and this permission notice shall be included 22 # The above copyright notice and this permission notice shall be included
23 # in all copies or substantial portions of the Software. 23 # in all copies or substantial portions of the Software.
24 # 24 #
25 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 25 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
26 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 26 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
27 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 # 32 #
33 33
34 __revision__ = "src/engine/SCons/Tool/mingw.py 3842 2008/12/20 22:59:52 scons" 34 __revision__ = "src/engine/SCons/Tool/mingw.py 3897 2009/01/13 06:45:54 scons"
35 35
36 import os 36 import os
37 import os.path 37 import os.path
38 import string 38 import string
39 39
40 import SCons.Action 40 import SCons.Action
41 import SCons.Builder 41 import SCons.Builder
42 import SCons.Defaults 42 import SCons.Defaults
43 import SCons.Tool 43 import SCons.Tool
44 import SCons.Util 44 import SCons.Util
(...skipping 10 matching lines...) Expand all
55 55
56 dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX') 56 dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
57 if dll: cmd.extend(['-o', dll]) 57 if dll: cmd.extend(['-o', dll])
58 58
59 cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS']) 59 cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
60 60
61 implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX') 61 implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
62 if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature)) 62 if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
63 63
64 def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX') 64 def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
65 if def_target: cmd.append('-Wl,--output-def,'+def_target.get_string(for_sign ature)) 65 insert_def = env.subst("$WINDOWS_INSERT_DEF")
66 if not insert_def in ['', '0', 0] and def_target: \
67 cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
66 68
67 return [cmd] 69 return [cmd]
68 70
69 def shlib_emitter(target, source, env): 71 def shlib_emitter(target, source, env):
70 dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX') 72 dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
71 no_import_lib = env.get('no_import_lib', 0) 73 no_import_lib = env.get('no_import_lib', 0)
72 74
73 if not dll: 75 if not dll:
74 raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX") 76 raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
75 77
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $ RCFLAGS -i $SOURCE -o $TARGET' 144 env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $ RCFLAGS -i $SOURCE -o $TARGET'
143 env['BUILDERS']['RES'] = res_builder 145 env['BUILDERS']['RES'] = res_builder
144 146
145 # Some setting from the platform also have to be overridden: 147 # Some setting from the platform also have to be overridden:
146 env['OBJSUFFIX'] = '.o' 148 env['OBJSUFFIX'] = '.o'
147 env['LIBPREFIX'] = 'lib' 149 env['LIBPREFIX'] = 'lib'
148 env['LIBSUFFIX'] = '.a' 150 env['LIBSUFFIX'] = '.a'
149 151
150 def exists(env): 152 def exists(env):
151 return find(env) 153 return find(env)
OLDNEW
« no previous file with comments | « third_party/scons/scons-local/SCons/Tool/midl.py ('k') | third_party/scons/scons-local/SCons/Tool/mslib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698