Index: tools/grit/grit_rule.gni |
diff --git a/tools/grit/grit_rule.gni b/tools/grit/grit_rule.gni |
index 68e5976fe1630a8a9b036295aec96b17ab2c4c63..90c0b00abbf925d383a421972f4ea6295ace52b0 100644 |
--- a/tools/grit/grit_rule.gni |
+++ b/tools/grit/grit_rule.gni |
@@ -182,8 +182,6 @@ if (enable_image_loader_extension) { |
if (is_android) { |
grit_defines += [ |
- "-t", |
- "android", |
"-E", |
"ANDROID_JAVA_TAGGED_ONLY=true", |
] |
@@ -196,11 +194,38 @@ if (is_mac || is_ios) { |
] |
} |
-if (is_ios) { |
- grit_defines += [ |
- "-t", |
- "ios", |
- ] |
+# When cross-compiling, explicitly pass the target system to grit. |
+if (current_toolchain != host_toolchain) { |
+ if (is_android) { |
+ grit_defines += [ |
+ "-t", |
+ "android", |
+ ] |
Nico
2016/04/04 01:36:08
I wish `gn format` allowed ` grit_defines += [
|
+ } |
+ if (is_ios) { |
+ grit_defines += [ |
+ "-t", |
+ "ios", |
+ ] |
+ } |
+ if (is_linux) { |
+ grit_defines += [ |
+ "-t", |
+ "linux2", |
+ ] |
+ } |
+ if (is_mac) { |
+ grit_defines += [ |
+ "-t", |
+ "darwin", |
+ ] |
+ } |
+ if (is_win) { |
+ grit_defines += [ |
+ "-t", |
+ "win32", |
+ ] |
+ } |
} |
if (enable_extensions) { |