From 272b311298d78569c88130ceee3096b876fcbf25 Mon Sep 17 00:00:00 2001 From: mtklein Date: Wed, 31 Aug 2016 05:03:31 -0700 Subject: [PATCH] GN: forgot Clang+ccache fix on Android. And sort. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298203002 No trybots for these yet... NOTRY=true TBR=jcgregorio@google.com Review-Url: https://codereview.chromium.org/2298203002 --- infra/bots/recipe_modules/flavor/gn_android_flavor.py | 7 +++++-- .../Build-Mac-Clang-mipsel-Debug-GN_Android.json | 2 +- .../Build-Ubuntu-Clang-arm64-Release-GN_Android.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index 8965233..9f3480a 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -18,19 +18,22 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): assert compiler == 'Clang' # At this rate we might not ever support GCC. compiler_prefix = '' + extra_cflags = [] ccache = self.m.run.ccache() if ccache: compiler_prefix = ccache + extra_cflags.append('-Qunused-arguments') ndk_asset = 'android_ndk_linux' if os == 'Ubuntu' else 'android_ndk_darwin' quote = lambda x: '"%s"' % x - gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in { + gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted({ 'compiler_prefix': quote(compiler_prefix), + 'extra_cflags': quote(' '.join(extra_cflags)), 'is_debug': 'true' if configuration == 'Debug' else 'false', 'ndk': quote(self.m.vars.slave_dir.join(ndk_asset)), 'target_cpu': quote(target_arch), - }.iteritems()) + }.iteritems())) run = lambda title, cmd: self.m.run(self.m.step, title, cmd=cmd, cwd=self.m.vars.skia_dir, **kwargs) diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json b/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json index f4d23b8..71dcb3c 100644 --- a/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json +++ b/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-mipsel-Debug-GN_Android.json @@ -127,7 +127,7 @@ "gn", "gen", "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-mipsel-Debug-GN_Android/Debug", - "--args=is_debug=true compiler_prefix=\"/usr/bin/ccache\" ndk=\"[SLAVE_BUILD]/android_ndk_darwin\" target_cpu=\"mipsel\"" + "--args=compiler_prefix=\"/usr/bin/ccache\" extra_cflags=\"-Qunused-arguments\" is_debug=true ndk=\"[SLAVE_BUILD]/android_ndk_darwin\" target_cpu=\"mipsel\"" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json index 2d93077..63f3e0e 100644 --- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json +++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android.json @@ -127,7 +127,7 @@ "gn", "gen", "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android/Release", - "--args=is_debug=false compiler_prefix=\"/usr/bin/ccache\" ndk=\"[SLAVE_BUILD]/android_ndk_linux\" target_cpu=\"arm64\"" + "--args=compiler_prefix=\"/usr/bin/ccache\" extra_cflags=\"-Qunused-arguments\" is_debug=false ndk=\"[SLAVE_BUILD]/android_ndk_linux\" target_cpu=\"arm64\"" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { -- 2.7.4