Bug 1162714 - Don't let YCM generate machc. r=ehsan
authorNicholas Hurley <hurley@todesschaf.org>
Thu, 07 May 2015 13:48:00 +0200
changeset 242929 3e46e2f117699b4897528d471b5d4a96299adbe8
parent 242928 98cd3686996be545ba08ce79026595f45c8370c5
child 242930 a54020a2280821292a46833c39f67c41a46d2bde
push id59550
push usercbook@mozilla.com
push dateFri, 08 May 2015 12:32:06 +0000
treeherdermozilla-inbound@3e46e2f11769 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1162714
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1162714 - Don't let YCM generate machc. r=ehsan
.ycm_extra_conf.py
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -1,25 +1,31 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import imp
 import os
 from StringIO import StringIO
 import shlex
+import sys
+
+old_bytecode = sys.dont_write_bytecode
+sys.dont_write_bytecode = True
 
 path = os.path.join(os.path.dirname(__file__), 'mach')
 
 if not os.path.exists(path):
     path = os.path.join(os.path.dirname(__file__), 'config.status')
     config = imp.load_module('_buildconfig', open(path), path, ('', 'r', imp.PY_SOURCE))
     path = os.path.join(config.topsrcdir, 'mach')
 mach_module = imp.load_module('_mach', open(path), path, ('', 'r', imp.PY_SOURCE))
 
+sys.dont_write_bytecode = old_bytecode
+
 def FlagsForFile(filename):
     mach = mach_module.get_mach()
     out = StringIO()
     out.encoding = None
     mach.run(['compileflags', filename], stdout=out, stderr=out)
 
     flag_list = shlex.split(out.getvalue())