summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-29 22:43:51 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-29 22:43:51 +0000
commit449ceab5755b5dab8884a88c179e8732e5a2a892 (patch)
tree35c1f78bc67acaa93fd22c84489b45ad77f5ef09 /components
parent4459599efe0c4b098232efe998c48bb66de3e7fc (diff)
downloadchromium_src-449ceab5755b5dab8884a88c179e8732e5a2a892.zip
chromium_src-449ceab5755b5dab8884a88c179e8732e5a2a892.tar.gz
chromium_src-449ceab5755b5dab8884a88c179e8732e5a2a892.tar.bz2
GN: Fix nacl_defines used in chrome/browser
chrome/browser/ was using a nacl_defines set from //native_client/..., which is not the same as the nacl_defines used by the gyp build in //components/nacl/. In particular, defining _XOPEN_SOURCE=600 breaks compilation on mac in highly mysterious ways. This adds a //components/nacl/nacl_defines.gni that mirros the defines in //components/nacl/nacl_defines.gypi to bring the builds back in line with each other. R=brettw@chromium.org TBR=noelallen@chromium.org for components/nacl Review URL: https://codereview.chromium.org/424043002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/nacl/nacl_defines.gni66
1 files changed, 66 insertions, 0 deletions
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",
+ ]
+}