Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: build/config/nacl/nacl_defines.gni

Issue 1312813003: add nacl_toolchain to //build and flip to using it in the GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_changes
Patch Set: rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/config/nacl/nacl_defines.gni
diff --git a/build/config/nacl/nacl_defines.gni b/build/config/nacl/nacl_defines.gni
new file mode 100644
index 0000000000000000000000000000000000000000..2297a07a5e47b29b67a8cd416c81a8f7d4a9f027
--- /dev/null
+++ b/build/config/nacl/nacl_defines.gni
@@ -0,0 +1,61 @@
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
Dirk Pranke 2015/08/28 02:29:41 This file is simply copied over from //native_clie
brettw 2015/08/28 19:08:38 Just noticed this... it seems just as easy to copy
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+nacl_defines = [
brettw 2015/08/28 18:25:52 I don't see why this is in a .gni file and not jus
Dirk Pranke 2015/08/28 20:08:32 Acknowledged.
+ "NACL_ANDROID=0",
+ "_DEFAULT_SOURCE=1",
+ "_BSD_SOURCE=1",
+ "_POSIX_C_SOURCE=199506",
+ "_XOPEN_SOURCE=600",
+ "_GNU_SOURCE=1",
+ "_LARGEFILE64_SOURCE=1",
brettw 2015/08/28 18:25:52 Looks like this is already defined in build/config
Dirk Pranke 2015/08/28 20:08:31 Acknowledged.
+ "__STDC_LIMIT_MACROS=1",
+ "__STDC_FORMAT_MACROS=1",
brettw 2015/08/28 18:25:52 __STDC_FORMAT_MACROS is set automatically by chrom
Dirk Pranke 2015/08/28 20:08:32 Acknowledged.
+]
+
+if (is_win) {
+ nacl_defines += [ "NACL_WINDOWS=1" ]
+} else {
+ nacl_defines += [ "NACL_WINDOWS=0" ]
+}
+
+if (is_linux) {
+ nacl_defines += [ "NACL_LINUX=1" ]
+} else {
+ nacl_defines += [ "NACL_LINUX=0" ]
+}
+
+if (is_mac) {
+ nacl_defines += [ "NACL_OSX=1" ]
+} else {
+ nacl_defines += [ "NACL_OSX=0" ]
+}
+
+if (current_cpu == "arm") {
+ nacl_defines += [
+ "NACL_BUILD_ARCH=arm",
+ "NACL_BUILD_SUBARCH=32",
+ ]
+}
+
+if (current_cpu == "mips") {
+ nacl_defines += [
+ "NACL_BUILD_ARCH=mips",
+ "NACL_BUILD_SUBARCH=32",
+ ]
+}
+
+if (current_cpu == "x86") {
+ nacl_defines += [
+ "NACL_BUILD_ARCH=x86",
+ "NACL_BUILD_SUBARCH=32",
+ ]
+}
+
+if (current_cpu == "x64") {
+ nacl_defines += [
+ "NACL_BUILD_ARCH=x86",
+ "NACL_BUILD_SUBARCH=64",
+ ]
+}

Powered by Google App Engine
This is Rietveld 408576698