OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright 2010 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
11 # copyright notice, this list of conditions and the following | 11 # copyright notice, this list of conditions and the following |
12 # disclaimer in the documentation and/or other materials provided | 12 # disclaimer in the documentation and/or other materials provided |
13 # with the distribution. | 13 # with the distribution. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 # to enfore syntax checking. | 149 # to enfore syntax checking. |
150 syntax_check = os.environ.get('V8_GYP_SYNTAX_CHECK') | 150 syntax_check = os.environ.get('V8_GYP_SYNTAX_CHECK') |
151 if syntax_check and int(syntax_check): | 151 if syntax_check and int(syntax_check): |
152 args.append('--check') | 152 args.append('--check') |
153 | 153 |
154 print 'Updating projects from gyp files...' | 154 print 'Updating projects from gyp files...' |
155 sys.stdout.flush() | 155 sys.stdout.flush() |
156 | 156 |
157 # Generate for the architectures supported on the given platform. | 157 # Generate for the architectures supported on the given platform. |
158 gyp_args = list(args) | 158 gyp_args = list(args) |
159 gyp_args.append('-Dtarget_arch=ia32') | 159 target_arch = None |
| 160 for p in gyp_args: |
| 161 if p.find('-Dtarget_arch=') == 0: |
| 162 target_arch = p |
| 163 if target_arch is None: |
| 164 gyp_args.append('-Dtarget_arch=ia32') |
160 if utils.GuessOS() == 'linux': | 165 if utils.GuessOS() == 'linux': |
161 gyp_args.append('-S-ia32') | 166 gyp_args.append('-S-ia32') |
162 run_gyp(gyp_args) | 167 run_gyp(gyp_args) |
163 | 168 |
164 if utils.GuessOS() == 'linux': | 169 if utils.GuessOS() == 'linux': |
165 gyp_args = list(args) | 170 gyp_args = list(args) |
166 gyp_args.append('-Dtarget_arch=x64') | 171 gyp_args.append('-Dtarget_arch=x64') |
167 gyp_args.append('-S-x64') | 172 gyp_args.append('-S-x64') |
168 run_gyp(gyp_args) | 173 run_gyp(gyp_args) |
169 | 174 |
170 gyp_args = list(args) | 175 gyp_args = list(args) |
171 gyp_args.append('-I' + v8_root + '/build/armu.gypi') | 176 gyp_args.append('-I' + v8_root + '/build/armu.gypi') |
172 gyp_args.append('-S-armu') | 177 gyp_args.append('-S-armu') |
173 run_gyp(gyp_args) | 178 run_gyp(gyp_args) |
174 | 179 |
175 gyp_args = list(args) | 180 gyp_args = list(args) |
176 gyp_args.append('-I' + v8_root + '/build/mipsu.gypi') | 181 gyp_args.append('-I' + v8_root + '/build/mipsu.gypi') |
177 gyp_args.append('-S-mipsu') | 182 gyp_args.append('-S-mipsu') |
178 run_gyp(gyp_args) | 183 run_gyp(gyp_args) |
OLD | NEW |