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

Unified Diff: tools/bots/dart_sdk.py

Issue 2231073002: Change SDK builder bot to use sysroots when compiling (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/bots/bot.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bots/dart_sdk.py
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index 92f89f8934dae7622dd0c7fa82a5f3a337f74df3..ff918599da92c4b7ecb80d368b35eb6b228b7dd0 100644
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -4,6 +4,7 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
+import os
import os.path
import shutil
import sys
@@ -21,8 +22,24 @@ CHANNEL = bot_utils.GetChannelFromName(bot_name)
def BuildSDK():
with bot.BuildStep('Build SDK'):
+ sysroot_env = dict(os.environ)
+ ia32root = os.path.join(bot_utils.DART_DIR, 'sysroots', 'build', 'linux',
+ 'debian_wheezy_i386-sysroot')
+ sysroot_env['CXXFLAGS'] = ("--sysroot=%s -I=/usr/include/c++/4.6 "
+ "-I=/usr/include/c++/4.6/i486-linux-gnu") % ia32root
+ sysroot_env['LDFLAGS'] = '--sysroot=%s' % ia32root
+ sysroot_env['CFLAGS'] = '--sysroot=%s' % ia32root
Run([sys.executable, './tools/build.py', '--mode=release',
- '--arch=ia32,x64', 'create_sdk'])
+ '--arch=ia32', 'create_sdk'], env=sysroot)
Bill Hesse 2016/08/10 15:34:06 This should have been env=sysroot_env
+
+ x64root = os.path.join(bot_utils.DART_DIR, 'sysroots', 'build', 'linux',
+ 'debian_wheezy_amd64-sysroot')
+ sysroot_env['CXXFLAGS'] = ("--sysroot=%s -I=/usr/include/c++/4.6 "
+ "-I=/usr/include/c++/4.6/x86_64-linux-gnu") % x64root
+ sysroot_env['LDFLAGS'] = '--sysroot=%s' % x64root
+ sysroot_env['CFLAGS'] = '--sysroot=%s' % x64root
+ Run([sys.executable, './tools/build.py', '--mode=release',
+ '--arch=x64', 'create_sdk'], env=sysroot)
def BuildDartdocAPIDocs(dirname):
dart_sdk = os.path.join(bot_utils.DART_DIR,
@@ -214,9 +231,9 @@ def DartArchiveFile(local_path, remote_path, checksum_files=False):
mangled_filename)
gsutil.upload(local_sha256, remote_path + '.sha256sum', public=True)
-def Run(command):
+def Run(command, env=None):
print "Running %s" % ' '.join(command)
- return bot.RunProcess(command)
+ return bot.RunProcess(command, env=env)
if __name__ == '__main__':
# We always clobber the bot, to make sure releases are build from scratch
« no previous file with comments | « tools/bots/bot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698