# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-#
-# IMPORTANT NOTE: If you make local mods to this file, you must run:
-# % pnacl/build.sh driver
-# in order for them to take effect in the scons build. This command
-# updates the copy in the toolchain/ tree.
# Global environment and expression parsing for the PNaCl driver
# Set by DriverMain
'DRIVER_PATH' : '', # Absolute path to this driver invocation
'DRIVER_BIN' : '', # PNaCl driver bin/ directory
- 'DRIVER_REV_FILE' : '${DRIVER_BIN}/REV',
+ 'DRIVER_REV_FILE' : '${BASE}/REV',
'BASE_NACL' : '${@FindBaseNaCl}', # Absolute path of native_client/
- 'BASE_TOOLCHAIN' : '${@FindBaseToolchain}', # Absolute path to toolchain/
+ 'BASE_TOOLCHAIN' : '${@FindBaseToolchain}', # Absolute path to toolchain/OS_ARCH/
'BASE' : '${@FindBasePNaCl}', # Absolute path to PNaCl
'BUILD_OS' : '${@GetBuildOS}', # "linux", "darwin" or "windows"
'BUILD_ARCH' : '${@GetBuildArch}', # "x86_64" or "i686" or "i386"
# Directories
+ 'CLANG_VER' : '3.4', # Included in path to compiler-owned libs/headers.
'BPREFIXES' : '', # Prefixes specified using the -B flag.
'BASE_LLVM' : '${@FindBaseHost:clang}',
'BASE_BINUTILS' : '${@FindBaseHost:le32-nacl-ar}',
- 'BASE_LIB_NATIVE' : '${BASE}/lib-',
+ 'BASE_LIB_NATIVE' : '${BASE}/translator/',
- 'BASE_USR' : '${BASE}/usr',
+ 'BASE_USR' : '${BASE}/le32-nacl',
'BASE_SDK' : '${BASE}/sdk',
- 'BASE_LIB' : '${BASE}/lib',
+ 'BASE_LIB' : '${BASE}/lib/clang/${CLANG_VER}/lib/le32-nacl',
'BASE_USR_ARCH' : '${BASE_USR_%BCLIB_ARCH%}',
- 'BASE_USR_X8664' : '${BASE}/usr-bc-x86-64',
+ 'BASE_USR_X8632' : '${BASE}/x86-32_bc-nacl',
+ 'BASE_USR_X8664' : '${BASE}/x86-64_bc-nacl',
+ 'BASE_USR_ARM' : '${BASE}/arm_bc-nacl',
'BASE_LIB_ARCH' : '${BASE_LIB_%BCLIB_ARCH%}',
- 'BASE_LIB_X8664' : '${BASE}/lib-bc-x86-64',
+ 'BASE_LIB_X8632' : '${BASE}/lib/clang/${CLANG_VER}/lib/x86-32_bc-nacl',
+ 'BASE_LIB_X8664' : '${BASE}/lib/clang/${CLANG_VER}/lib/x86-64_bc-nacl',
+ 'BASE_LIB_ARM' : '${BASE}/lib/clang/${CLANG_VER}/lib/arm_bc-nacl',
+
+ 'LIBS_NATIVE_ARCH' : '${LIBS_NATIVE_%ARCH%}',
+ 'LIBS_NATIVE_ARM' : '${BASE_LIB_NATIVE}arm/lib',
+ 'LIBS_NATIVE_ARM_NONSFI' : '${BASE_LIB_NATIVE}arm-nonsfi/lib',
+ 'LIBS_NATIVE_X8632' : '${BASE_LIB_NATIVE}x86-32/lib',
+ 'LIBS_NATIVE_X8632_NONSFI' : '${BASE_LIB_NATIVE}x86-32-nonsfi/lib',
+ 'LIBS_NATIVE_X8664' : '${BASE_LIB_NATIVE}x86-64/lib',
+ 'LIBS_NATIVE_MIPS32' : '${BASE_LIB_NATIVE}mips32/lib',
'BASE_LLVM_BIN' : '${BASE_LLVM}/bin',
'TRANSLATOR_BIN' :
- '${BASE_TOOLCHAIN}/pnacl_translator/${STANDARD_ARCH}/bin',
+ '${BASE_TOOLCHAIN}/pnacl_translator/translator/${TRANSLATOR_ARCH}/bin',
- # TODO(pdox): Unify this with ARCH.
- 'STANDARD_ARCH' : '${STANDARD_ARCH_%ARCH%}',
- 'STANDARD_ARCH_X8632' : 'i686',
- 'STANDARD_ARCH_X8664' : 'x86_64',
- 'STANDARD_ARCH_ARM' : 'armv7',
- 'STANDARD_ARCH_MIPS32': 'mips32',
+ # TODO(dschuff): Switch these directories to be triple-style arches,
+ # to match the main toolchain?
+ 'TRANSLATOR_ARCH' : '${TRANSLATOR_ARCH_%ARCH%}',
+ 'TRANSLATOR_ARCH_X8632' : 'x86-32',
+ 'TRANSLATOR_ARCH_X8664' : 'x86-64',
+ 'TRANSLATOR_ARCH_ARM' : 'arm',
+ 'TRANSLATOR_ARCH_MIPS32': 'mips32',
'SCONS_OUT' : '${BASE_NACL}/scons-out',
# Driver settings
- 'ARCH' : '', # Target architecture
+ 'ARCH' : '', # Target architecture, including optional
+ # suffixes such as '_NONSFI' or '_LINUX'.
+ 'BASE_ARCH' : '', # Target architecture without any '_NONSFI' suffix.
+ # Derived from ARCH field.
+ 'NONSFI_NACL' : '0', # Whether targeting Non-SFI Mode. Derived from
+ # ARCH field.
'BIAS' : 'NONE', # This can be 'NONE', 'ARM', 'MIPS32', 'X8632' or
# 'X8664'.
# When not set to none, this causes the front-end to
# if it only has the backend translator.
'USE_EMULATOR' : '0',
- 'USE_BOOTSTRAP' : '${BUILD_OS==linux ? 1 : 0}',
# Args passed from one driver invocation to another
'INHERITED_DRIVER_ARGS' : '',
'EMULATOR_X8664' : '',
# NOTE: this is currently the only dependency on the arm trusted TC
'EMULATOR_ARM' :
- '${BASE_NACL}/toolchain/linux_arm-trusted/run_under_qemu_arm',
+ '${BASE_NACL}/toolchain/linux_x86/arm_trusted/run_under_qemu_arm',
'EMULATOR_MIPS32' :
- '${BASE_NACL}/toolchain/linux_mips-trusted/run_under_qemu_mips32',
+ '${BASE_NACL}/toolchain/linux_x86/mips_trusted/run_under_qemu_mips32',
'SEL_LDR' : '${SCONS_STAGING}/sel_ldr${EXEC_EXT}',
'BOOTSTRAP_LDR' : '${SCONS_STAGING}/nacl_helper_bootstrap${EXEC_EXT}',