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

Side by Side Diff: build/config/nacl/BUILD.gn

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: merge to #346439 Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « .gn ('k') | build/toolchain/nacl/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # Native Client Definitions
6 config("nacl_defines") {
7 defines = [
8 "NACL_ANDROID=0",
9 "_DEFAULT_SOURCE=1",
10 "_BSD_SOURCE=1",
11 "_POSIX_C_SOURCE=199506",
12 "_XOPEN_SOURCE=600",
13 "_GNU_SOURCE=1",
14 "__STDC_LIMIT_MACROS=1",
15 ]
16
17 if (is_win) {
18 defines += [ "NACL_WINDOWS=1" ]
19 } else {
20 defines += [ "NACL_WINDOWS=0" ]
21 }
22
23 if (is_linux) {
24 defines += [ "NACL_LINUX=1" ]
25 } else {
26 defines += [ "NACL_LINUX=0" ]
27 }
28
29 if (is_mac) {
30 defines += [ "NACL_OSX=1" ]
31 } else {
32 defines += [ "NACL_OSX=0" ]
33 }
34
35 if (current_cpu == "arm") {
36 defines += [
37 "NACL_BUILD_ARCH=arm",
38 "NACL_BUILD_SUBARCH=32",
39 ]
40 }
41
42 if (current_cpu == "mips") {
43 defines += [
44 "NACL_BUILD_ARCH=mips",
45 "NACL_BUILD_SUBARCH=32",
46 ]
47 }
48
49 if (current_cpu == "x86") {
50 defines += [
51 "NACL_BUILD_ARCH=x86",
52 "NACL_BUILD_SUBARCH=32",
53 ]
54 }
55
56 if (current_cpu == "x64") {
57 defines += [
58 "NACL_BUILD_ARCH=x86",
59 "NACL_BUILD_SUBARCH=64",
60 ]
61 }
62 }
63
64 config("nexe_defines") {
65 defines = [
66 "DYNAMIC_ANNOTATIONS_ENABLED=1",
67 "DYNAMIC_ANNOTATIONS_PREFIX=NACL_",
68 ]
69 }
70
71 # The base target that all targets in the NaCl build should depend on.
72 # This allows configs to be modified for everything in the NaCl build, even when
73 # the NaCl build is composed into the Chrome build. (GN has no functionality to
74 # add flags to everythin in //native_client, having a base target works around
75 # that limitation.)
76 source_set("nacl_base") {
77 public_configs = [ ":nacl_defines" ]
78 if (current_os == "nacl") {
79 public_configs += [ ":nexe_defines" ]
80 }
81 }
OLDNEW
« no previous file with comments | « .gn ('k') | build/toolchain/nacl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698