build_nexe: Tolerate variants of Release and Debug in build config names

On Windows, 64-bit builds have build type names like 'Release_x64', so
treat them the same as if they were just 'Release'

R=thakis@chromium.org, bradnelson@chromium.org
BUG= https://code.google.com/p/chromium/issues/detail?id=413266

Review URL: https://codereview.chromium.org/567573003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13730 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Turn on goma for nacl and switch windows to ninja, fix tls_edit weirdness.

Only invoke pnacl tools with shell=True on windows as this seems to fail some of the time for tls_edit.exe

Fix issue with test_build.py emitting forward slashes that breaks nacl gyp build on windows.

Add a new msvs_warnings item for 4244, which seems to be implicit in our raw msvs_settings, but which the ninja generator doesn't seem to automatically convert.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3933
BUG=https://code.google.com/p/chromium/issues/detail?id=390764
TEST=trybots
R=ncbray@chromium.org, mseaborn@chromium.org

Review URL: https://codereview.chromium.org/560603002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13731 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update GCC toolchains to r13729

This brings in a GDB build that supports --tui on Linux.

BUG= https://code.google.com/p/chromium/issues/detail?id=391170
TEST= trybots
R=bradnelson@google.com, dyen@chromium.org

Review URL: https://codereview.chromium.org/560363002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13732 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Build x86-32 IRT with PNaCl

This builds the IRT with PNaCl instead of nacl-gcc on x86-32.
This uses the same flags and build style that we use on x86-64,
and will allow use of C++11 language features in the Chromium
code that goes into the IRT. Some notes:
 * the x86-64 IRT already uses PNaCl.
 * the ARM IRT uses arm-nacl-gcc which is gcc 4.8 and so
 has C++11 support. We plan to switch ARM to PNaCl as
 well anyway for consistency, and to simplify the GYP.
 * PNaCl still uses libstdc++ instead of libc++ for the
 IRT. This was done for consistency with the gcc builds,
 but we will switch to libc++ soon. This will allow C++11
 library features as well (and will allow us to drop
 libstdc++ from PNaCl entirely).

This is a reland of r13687/13692, with the exception that we still
build with nacl-gcc in scons on Windows, and disable SSE instructions.

R=mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3910
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3935
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3936

Review URL: https://codereview.chromium.org/557233004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13733 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Added support for extending basic thread functions in irt_ext.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3918
TEST= trybots

Review URL: https://codereview.chromium.org/560143004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13734 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Added testing for file link operations in irt_ext tests.

R=mcgrathr@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3918
TEST= trybots

Review URL: https://codereview.chromium.org/567683002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13735 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13736 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13737 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Override xcode architecture for ia32 standalone builds

This fixes the -arch flag passed to clang on recent Xcode versions on
systems where the default is x86-64.

R=bradnelson@chromium.org
BUG=local mac build

Review URL: https://codereview.chromium.org/565673005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13738 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Non-SFI mode: Add -malign-double flag to pnacl-translate.

A new flag -malign-double is supported by
https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=969f37dfef3241dcc04ce1c9d029f06a62cb0e95
This CL passes through the flag.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3913
TEST=Ran trybot. Patch this and the llvm-side CL locally and build a binary.
R=dschuff@chromium.org, mseaborn@chromium.org

Review URL: https://codereview.chromium.org/557213002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13739 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update revision for PNaCl r13726->r13739

Pull the following PNaCl changes into NaCl:
  r13739: (hidehiko@chromium.org) Non-SFI mode: Add -malign-double flag to pnacl-translate.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3913
TBR= hidehiko@chromium.org, mseaborn@chromium.org, dschuff@chromium.org
TEST=git cl try
(Please LGTM this change and tick the "commit" box)

Review URL: https://codereview.chromium.org/568783003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13740 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Implemented sysconf(), sbrk(), malloc() in MinSFI.

This patch adds support for heap allocation. It uses the same Doug Lea's
implementation of malloc() as libnacl and introduces the following MinSFI
system calls required to compile it.

heaplim(): Returns the limits of the heap as pre-allocated by the loader. 
  It is used by sbrk() inside the untrusted support library.

sysconf(): Returns configuration information. Supports only page size
  queries at the moment.

The sched_yield() call is stubbed out.

Tests are now built with strict error reporting.

BUG= https://code.google.com/p/chromium/issues/detail?id=397177
TEST= ./scons platform=x86_64 bitcode=1 minsfi=1 minsfi_tests
NOTRY=true

Review URL: https://codereview.chromium.org/563723003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13741 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Added testing for file dup/dup2 functions for irt_ext.

R=mcgrathr@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3918
TEST= trybots

Review URL: https://codereview.chromium.org/571553002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13742 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Add a checkdeps stage to the PNaCl bots/trybots as well.

Make it slightly more consistent with buildbot_standard
and the PNaCl toolchain bots.

This helps check things when running tryjobs on only the
PNaCl bots, before running full tryjobs on all bots.

BUG=none

Review URL: https://codereview.chromium.org/566983002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13743 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Only allow fastbuild to affect symbol level.

We've misinterpreted what fastbuild was meant to control in the chrome build.
It was only meant to affect the debug information level.
We instead allowed it to affect optimization.
Switching it to match chrome.

BUG=https://code.google.com/p/chromium/issues/detail?id=413191
TEST=trybots
R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/554063003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13744 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update Subzero revision in pnacl/COMPONENT_REVISIONS

This pulls in the following Subzero changes:

e58178a: (wala@chromium.org) Subzero: Factor our commonalities between mov-like instructions.
c8e8781: (jvoung@chromium.org) Convert lit test llvm-mc -arch arguments to full -triple.
f820da5: (jvoung@chromium.org) Emit .local before .comm for bss to make llvm-mc happy.
d4799f4: (wala@chromium.org) Subzero: Align spill locations to natural alignment.
9dbe38e: (wala@chromium.org) Subzero: Start a list of SIMD improvement ideas.
c330274: (wala@chromium.org) Subzero: Randomly insert nops.
4d79fe5: (stichnot@chromium.org) Subzero: Fix the simple register allocation for -Om1.
420e8bf: (stichnot@chromium.org) COmmit
6170e75: (stichnot@chromium.org) Revert "COmmit"
bfb03e5: (stichnot@chromium.org) Subzero: Fixes for Hello World and bisection debugging.
ac9c943: (stichnot@chromium.org) Subzero: Add a check-lit target for faster smoke testing.
ef8cf0e: (stichnot@chromium.org) Subzero: Fix some legalization issues involving immediates.
14c3f41: (stichnot@chromium.org) Subzero: Fix the link command for Trusty.
89d7956: (stichnot@chromium.org) Subzero: Fix address mode optimization involving phi temporaries.
d6064a1: (kschimpf@google.com) Start processing function blocks.
ce58163: (jvoung@chromium.org) Add pnacl-freeze to the tests_lit/lit.cfg. Also, unsigned vs signed.
b17f61d: (jvoung@chromium.org) Align function starts to target-specific bundle alignment.
dddc306: (jvoung@chromium.org) Convert lit tests to check disassembled assembly.
c0fdc27: (kschimpf@google.com) Add cast instructions to subzero's pnacl bitcode translator.
16178a1: (stichnot@chromium.org) Subzero: Remove the need for a separate NaCl SDK installation.
94539ce: (stichnot@chromium.org) Subzero: Rename -external to -externalize to match llc.
71ba822: (kschimpf@google.com) Add vector insert/extract instructions to Subzero bitcode reader.
cabfa30: (stichnot@chromium.org) Subzero: Render constants in dump() to be more like LLVM.
dd7b846: (stichnot@chromium.org) Subzero: Make sure register preferences obey register class constraints.
523ef72: (stichnot@chromium.org) Subzero: Work around another llvm-mc parser bug for relocatable symbols.
1d6f0e4: (kschimpf@google.com) Add select instruction to Subzero bitcode reader.
dd30c81: (stichnot@chromium.org) Subzero: Fix sext/zext lowering with i1 source operands.
83f9f0c: (kschimpf@google.com) Add icmp and fcmp instructions to Subzero bitcode reader.
c836acb: (kschimpf@google.com) Add branch instructions to Subzero bitcode reader.
b63cd88: (stichnot@chromium.org) Subzero: Use cvttss2si and similar instead of cvtss2si for fp->int casts.
3ef786f: (stichnot@chromium.org) Subzero: Be more strict about i1 calculations.
7076c88: (stichnot@chromium.org) Subzero: Move python scripts into a common pydir.
f12355e: (kschimpf@google.com) Add constants block to PNaCl bitcode reader.
72a8f8d: (stichnot@chromium.org) Subzero: Make sure alloca with align=0 is handled correctly.
10ea698: (stichnot@chromium.org) Subzero: Add a script that builds a hybrid Subzero/llc native executable.
742d72d: (kschimpf@google.com) Add alloca instruction to Subzero bitcode reader.
6d4f564: (stichnot@chromium.org) Subzero: The cross tests should use the actual Subzero runtime.
a262333: (jvoung@chromium.org) List Subzero's local optlevel flags after LLVM's cxxflags (precedence).
e5a5be7: (stichnot@chromium.org) Subzero: Fix Phi lowering.
41689df: (kschimpf@google.com) Add load and store instructions to Subzero bitcode reader.
64dcde7: (kschimpf@google.com) Fix bug introduced by CL 561883002.
c132b76: (kschimpf@google.com) Fix symbol table handling in functions.
65d8d53: (stichnot@chromium.org) Subzero: Print defaults as appropriate in python script help text.
4766156: (kschimpf@google.com) Add phi instruction to Subzero bitcode reader.
44d53e1: (jvoung@chromium.org) Mark setjmp as "returns twice" and turn off SimpleCoalescing when called.
5ee234a: (kschimpf@google.com) Allow ability to name unnamed global addresses in Subzero.
1eb3a55: (jvoung@chromium.org) Switch to llvm::findFirstSet instead of ffs since mingw doesn't have ffs.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3929
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3892
TEST= PNaCl toolchain trybots
R=kschimpf@google.com

Review URL: https://codereview.chromium.org/545063004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13745 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Add creat() declaration to newlib fcntl.h

newlib contains generic creat() implementation that
forwards to open(). We are already shipping this
in libcrt_common.a but not declaring it.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3945
TEST= toolchain trybots
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/565783002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13746 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Fix toolchain build and sandboxed translation tests on FYI bots

The FYI bots are not running the step which downloads the current
Chrome clang, and so are failing to build the toolchain.
The sandboxed translation tests are also failing because a service
runtime test depends on a nexe built by the toolchain.

This CL adds the clang update step, and disables the "trusted"
NaCl tests (as we do on other scons runs that test the PNaCl
toolchain)

R=jvoung@chromium.org
BUG=red FYI bots

Review URL: https://codereview.chromium.org/562273003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13747 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Pass -std=gnu++0x in build_nexe.py.

Doing this here instead of untrusted.gypi since the option isn't valid for
C files.

BUG=chromium:414314
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_rel_precise32,linux_nacl_sdk,linux_chromium_dbg,linux_arm_cross_compile
R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/571143002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13748 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM change:

41b16f5: (jvoung@chromium.org) Ensure that x86 prefixes are bundled-locked to instruction (in asm mode).
f33570d: (kschimpf@google.com) Allow errors in PNaCl bitcode readers to be directed to any raw_ostream.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3929
TEST= PNaCl toolchain trybots
R=dschuff@chromium.org, kschimpf@google.com

Review URL: https://codereview.chromium.org/575863002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13749 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2