[GN] Use correct toolchain for x64 target on Android
authorhalton.huo <halton.huo@intel.com>
Wed, 1 Apr 2015 01:44:22 +0000 (18:44 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Apr 2015 01:44:33 +0000 (01:44 +0000)
This commit is to fix the linking error:
  ../../v8/src/base/platform/platform-posix.cc:418: error: undefined reference to '__android_log_vprint'

Review URL: https://codereview.chromium.org/1037193003

Cr-Commit-Position: refs/heads/master@{#27559}

BUILD.gn

index 6b102f37a102c1a03734a186106032d001ea4ce7..34500fe01b9f013fcdaeca9a87f4341bf3053174 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -32,9 +32,14 @@ v8_toolset_for_d8 = "host"
 # TODO(GYP): For now we only support 32-bit little-endian target builds from an
 # x64 Linux host. Eventually we need to support all of the host/target
 # configurations v8 runs on.
-if (host_cpu == "x64" && host_os == "linux" &&
-    (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) {
-  snapshot_toolchain = "//build/toolchain/linux:clang_x86"
+if (host_cpu == "x64" && host_os == "linux") {
+  if (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86") {
+    snapshot_toolchain = "//build/toolchain/linux:clang_x86"
+  } else if (target_cpu == "x64") {
+    snapshot_toolchain = "//build/toolchain/linux:clang_x64"
+  } else {
+    assert(false, "Need environment for this arch")
+  }
 } else {
   snapshot_toolchain = default_toolchain
 }