1 # Copyright 2014 The Chromium 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 nacl_defines = [] 6 if (is_win) { 7 nacl_defines += [ 8 "NACL_WINDOWS=1", 9 "NACL_LINUX=0", 10 "NACL_OSX=0", 11 "NACL_ANDROID=0", 12 ] 13 } else if (is_linux) { 14 nacl_defines += [ 15 "NACL_WINDOWS=0", 16 "NACL_LINUX=1", 17 "NACL_OSX=0", 18 "NACL_ANDROID=0", 19 ] 20 } else if (is_mac) { 21 nacl_defines += [ 22 "NACL_WINDOWS=0", 23 "NACL_LINUX=0", 24 "NACL_OSX=1", 25 "NACL_ANDROID=0", 26 ] 27 } 28 29 if (is_android) { 30 nacl_defines += [ 31 "NACL_WINDOWS=0", 32 "NACL_LINUX=1", 33 "NACL_OSX=0", 34 "NACL_ANDROID=1", 35 ] 36 } 37 38 if (cpu_arch == "x86") { 39 nacl_defines += [ 40 "NACL_TARGET_SUBARCH=32", 41 "NACL_TARGET_ARCH=x86", 42 "NACL_BUILD_SUBARCH=32", 43 "NACL_BUILD_ARCH=x86", 44 ] 45 } else if (cpu_arch == "x64") { 46 nacl_defines += [ 47 "NACL_TARGET_SUBARCH=64", 48 "NACL_TARGET_ARCH=x86", 49 "NACL_BUILD_SUBARCH=64", 50 "NACL_BUILD_ARCH=x86", 51 ] 52 } else if (cpu_arch == "arm") { 53 nacl_defines += [ 54 "NACL_BUILD_ARCH=arm", 55 "NACL_BUILD_SUBARCH=32", 56 "NACL_TARGET_ARCH=arm", 57 "NACL_TARGET_SUBARCH=32", 58 ] 59 } else if (cpu_arch == "mipsel") { 60 nacl_defines += [ 61 "NACL_BUILD_ARCH=mips", 62 "NACL_BUILD_SUBARCH=32", 63 "NACL_TARGET_ARCH=mips", 64 "NACL_TARGET_SUBARCH=32", 65 ] 66 } 67