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.
5 # Native Client Definitions
6 config("nacl_defines") {
11 "_POSIX_C_SOURCE=199506",
14 "__STDC_LIMIT_MACROS=1",
18 defines += [ "NACL_WINDOWS=1" ]
20 defines += [ "NACL_WINDOWS=0" ]
24 defines += [ "NACL_LINUX=1" ]
26 defines += [ "NACL_LINUX=0" ]
30 defines += [ "NACL_OSX=1" ]
32 defines += [ "NACL_OSX=0" ]
35 if (current_cpu == "arm") {
37 "NACL_BUILD_ARCH=arm",
38 "NACL_BUILD_SUBARCH=32",
42 if (current_cpu == "mips") {
44 "NACL_BUILD_ARCH=mips",
45 "NACL_BUILD_SUBARCH=32",
49 if (current_cpu == "x86") {
51 "NACL_BUILD_ARCH=x86",
52 "NACL_BUILD_SUBARCH=32",
56 if (current_cpu == "x64") {
58 "NACL_BUILD_ARCH=x86",
59 "NACL_BUILD_SUBARCH=64",
64 config("nexe_defines") {
66 "DYNAMIC_ANNOTATIONS_ENABLED=1",
67 "DYNAMIC_ANNOTATIONS_PREFIX=NACL_",
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
76 source_set("nacl_base") {
77 public_configs = [ ":nacl_defines" ]
78 if (current_os == "nacl") {
79 public_configs += [ ":nexe_defines" ]