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

Side by Side Diff: gypfiles/gyp_v8

Issue 2324173002: Revert of [gn] Switch off gyp in runhooks by default (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « DEPS ('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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 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
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 (x86_runtime, x64_runtime)) 111 (x86_runtime, x64_runtime))
112 112
113 if rc != 0: 113 if rc != 0:
114 print 'Error running GYP' 114 print 'Error running GYP'
115 sys.exit(rc) 115 sys.exit(rc)
116 116
117 117
118 if __name__ == '__main__': 118 if __name__ == '__main__':
119 args = sys.argv[1:] 119 args = sys.argv[1:]
120 120
121 gyp_chromium_no_action = os.environ.get('GYP_CHROMIUM_NO_ACTION') 121 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)):
122 if gyp_chromium_no_action == '1':
123 print 'Skipping gyp_v8 due to GYP_CHROMIUM_NO_ACTION env var.' 122 print 'Skipping gyp_v8 due to GYP_CHROMIUM_NO_ACTION env var.'
124 sys.exit(0) 123 sys.exit(0)
125 124
126 running_as_hook = '--running-as-hook'
127 if running_as_hook in args and gyp_chromium_no_action != '0':
128 print 'GYP is now disabled by default in runhooks.\n'
129 print 'If you really want to run this, either run '
130 print '`python gypfiles/gyp_v8` explicitly by hand '
131 print 'or set the environment variable GYP_CHROMIUM_NO_ACTION=0.'
132 sys.exit(0)
133
134 gyp_environment.set_environment() 125 gyp_environment.set_environment()
135 126
136 # This could give false positives since it doesn't actually do real option 127 # This could give false positives since it doesn't actually do real option
137 # parsing. Oh well. 128 # parsing. Oh well.
138 gyp_file_specified = False 129 gyp_file_specified = False
139 for arg in args: 130 for arg in args:
140 if arg.endswith('.gyp'): 131 if arg.endswith('.gyp'):
141 gyp_file_specified = True 132 gyp_file_specified = True
142 break 133 break
143 134
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 176
186 gyp_defines = os.environ.get('GYP_DEFINES', '') 177 gyp_defines = os.environ.get('GYP_DEFINES', '')
187 178
188 # Automatically turn on crosscompile support for platforms that need it. 179 # Automatically turn on crosscompile support for platforms that need it.
189 if all(('ninja' in gyp_generators, 180 if all(('ninja' in gyp_generators,
190 'OS=android' in gyp_defines, 181 'OS=android' in gyp_defines,
191 'GYP_CROSSCOMPILE' not in os.environ)): 182 'GYP_CROSSCOMPILE' not in os.environ)):
192 os.environ['GYP_CROSSCOMPILE'] = '1' 183 os.environ['GYP_CROSSCOMPILE'] = '1'
193 184
194 run_gyp(gyp_args) 185 run_gyp(gyp_args)
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698