diff options
-rw-r--r-- | chrome/browser/BUILD.gn | 2 | ||||
-rw-r--r-- | components/nacl/nacl_defines.gni | 66 |
2 files changed, 67 insertions, 1 deletions
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 43dbfbc..150f254 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -5,7 +5,7 @@ import("//build/config/crypto.gni") import("//build/config/features.gni") import("//build/config/ui.gni") -import("//native_client/build/config/nacl_defines.gni") +import("//components/nacl/nacl_defines.gni") import("//tools/grit/grit_rule.gni") about_credits_file = "$target_gen_dir/about_credits.html" diff --git a/components/nacl/nacl_defines.gni b/components/nacl/nacl_defines.gni new file mode 100644 index 0000000..ab9d645 --- /dev/null +++ b/components/nacl/nacl_defines.gni @@ -0,0 +1,66 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +nacl_defines = [] +if (is_win) { + nacl_defines += [ + "NACL_WINDOWS=1", + "NACL_LINUX=0", + "NACL_OSX=0", + "NACL_ANDROID=0", + ] +} else if (is_linux) { + nacl_defines += [ + "NACL_WINDOWS=0", + "NACL_LINUX=1", + "NACL_OSX=0", + "NACL_ANDROID=0", + ] +} else if (is_mac) { + nacl_defines += [ + "NACL_WINDOWS=0", + "NACL_LINUX=0", + "NACL_OSX=1", + "NACL_ANDROID=0", + ] +} + +if (is_android) { + nacl_defines += [ + "NACL_WINDOWS=0", + "NACL_LINUX=1", + "NACL_OSX=0", + "NACL_ANDROID=1", + ] +} + +if (cpu_arch == "x86") { + nacl_defines += [ + "NACL_TARGET_SUBARCH=32", + "NACL_TARGET_ARCH=x86", + "NACL_BUILD_SUBARCH=32", + "NACL_BUILD_ARCH=x86", + ] +} else if (cpu_arch == "x64") { + nacl_defines += [ + "NACL_TARGET_SUBARCH=64", + "NACL_TARGET_ARCH=x86", + "NACL_BUILD_SUBARCH=64", + "NACL_BUILD_ARCH=x86", + ] +} else if (cpu_arch == "arm") { + nacl_defines += [ + "NACL_BUILD_ARCH=arm", + "NACL_BUILD_SUBARCH=32", + "NACL_TARGET_ARCH=arm", + "NACL_TARGET_SUBARCH=32", + ] +} else if (cpu_arch == "mipsel") { + nacl_defines += [ + "NACL_BUILD_ARCH=mips", + "NACL_BUILD_SUBARCH=32", + "NACL_TARGET_ARCH=mips", + "NACL_TARGET_SUBARCH=32", + ] +} |