native_client/src/native_client/site_scons.git
8 days agoUnsandboxed IRT: Add support for Mac OS X master
mseaborn@chromium.org [Mon, 7 Apr 2014 22:27:22 +0000 (22:27 +0000)]
Unsandboxed IRT: Add support for Mac OS X

Extend the PNaCl toolchain to be able to translate a pexe to an OS X
executable.

This doesn't include threading support: I'll add that in a separate
change, since it involves adding a futex implementation.

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

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

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

3 weeks agoModified Scons rules to use thew new standardized toolchain location
dyen@chromium.org [Wed, 19 Mar 2014 21:22:09 +0000 (21:22 +0000)]
Modified Scons rules to use thew new standardized toolchain location

The new toolchain locations have been standardized, this CL makes scons
use the new location rather than the old one. Transitionally both
locations still exist, but eventually the old one will be deleted.

R=bradnelson@google.com, jvoung@chromium.org, mcgrathr@chromium.org, noelallen@chromium.org
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3816
TEST= trybots

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

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

4 weeks agoPNaCl: Rename pnacl-translate's "linux-x86-32" arch to "x86-32-linux"
mseaborn@chromium.org [Fri, 14 Mar 2014 23:22:42 +0000 (23:22 +0000)]
PNaCl: Rename pnacl-translate's "linux-x86-32" arch to "x86-32-linux"

Later I'll want to make pnacl-translate accept "-arch x86-32-nonsfi":

 * "linux" means we produce a glibc-based Linux executable that
   contains its own implementation of IRT interfaces, and runs
   unsandboxed outside of the browser.

 * "nonsfi" means we produce an executable that runs seccomp-sandboxed
   inside Chromium (in Non-SFI Mode), and relies on Chromium to
   implement IRT interfaces.

Chromium already accepts "x86-32-nonsfi" in manifest files when
"--enable-nacl-nonsfi-mode" is passed.  I want to change the "linux"
prefix to be a suffix to be more consistent with that.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3809
TEST=PNaCl toolchain trybot
R=jvoung@chromium.org

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

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

2 months agoRemove unused code relating to a never-finished ARM Thumb sandbox
mseaborn@chromium.org [Thu, 13 Feb 2014 23:51:08 +0000 (23:51 +0000)]
Remove unused code relating to a never-finished ARM Thumb sandbox

Some years ago, some work was done on a NaCl sandbox for untrusted ARM
Thumb code.  Some changes were made to service_runtime, but no
validator implementation was ever committed.  Let's remove these
changes to avoid confusion.

Note that ARM sel_ldr can still contain some trusted Thumb code.

BUG=none
TEST=trybots
R=mcgrathr@chromium.org

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

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

2 months agopnacl-nativeld: Use RunWithSplit RPC instead of RunWithDefaultCmdLine
dschuff@chromium.org [Thu, 13 Feb 2014 16:46:38 +0000 (16:46 +0000)]
pnacl-nativeld: Use RunWithSplit RPC instead of RunWithDefaultCmdLine

When using module splitting, use ld's new RunWithSplit RPC, passing
the main object file descriptors specially, rather than relying on
sel_universal's reverse service mapping to look them up.

R=jfb@chromium.org, jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3777

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

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

2 months agoDropping remaining python_26 references.
bradnelson@google.com [Mon, 10 Feb 2014 20:00:26 +0000 (20:00 +0000)]
Dropping remaining python_26 references.

We recently started using the environment provide python on windows.
Scripts that invoke scons.bat (toolchain), however, were still hitting a copy
of python_26 checked out on the bots.

Dropping this reference to python_26.

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

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

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

2 months agoAdds tls_edit utility which patches irt_core.nexe's TLS usage.
dyen@chromium.org [Tue, 4 Feb 2014 19:29:44 +0000 (19:29 +0000)]
Adds tls_edit utility which patches irt_core.nexe's TLS usage.

Currently we compile in different instructions to manage the 2 TLS
usages between an untrusted nacl app and the IRT. This adds a new
utility (tls_edit) which goes through nexe's and edits the
instructions which use the TLS to point to the correct location.
This way we don't have to do anything special when compiling the
IRT.

The ComponentProgram function has also been separated so creating
of the ComponentProgram is done separately from aliasing programs
to the "COMPONENT_PROGRAM_GROUPS" aliases. This way we can add in
extra steps between the building of the Component Program and
adding the program to the correct component program aliases. This
is now necessary because the IRT core is now built and uses
tls_edit as an intermediate step before the nexe is complete.

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

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

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

2 months agommap main nexe if fd is "essentially immutable"
bsy@google.com [Tue, 21 Jan 2014 18:08:53 +0000 (18:08 +0000)]
mmap main nexe if fd is "essentially immutable"

https://codereview.chromium.org/83303004/ (or https://codereview.chromium.org/83303007/ -- upload issues, will be retrying) is needed plugin-side to benefit from this change.

The test uses sel_universal and NACL_FI to ensure that the mmap code path is hit, and that the nexe runs successfully.

BUG= https://codereview.chromium.org/83303004/
TEST= run_mmap_main_nexe_rpc
R=ncbray@chromium.org

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

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

4 months agoUse scons's UserError in scons scripts rather than builtin python exceptions.
sbc@chromium.org [Wed, 4 Dec 2013 03:33:49 +0000 (03:33 +0000)]
Use scons's UserError in scons scripts rather than builtin python exceptions.

This makes normal user errors (such as mistyping an
argument name) show up in a readable form rather than
a long backtrace (that makes this user at least think
that there is a bug in the program).

Also, add a check in site_scons that we are indeed using
the local version of scons and not the system one.

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

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

4 months agoDeploy new x86 binutils
mcgrathr@chromium.org [Thu, 21 Nov 2013 17:49:44 +0000 (17:49 +0000)]
Deploy new x86 binutils

This puts in place the x86 toolchain using the new 2.24-based binutils.
A previous iteration of this was landed at r12382 and reverted at r12385.
This re-land has a new toolchain build that should fix the problems with
the build_nexe/gyp build of untrusted code with glibc.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3636
TEST= trybots
R=bsy@google.com, sehr@chromium.org

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

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

5 months agoRevert 12382 "Deploy new x86 binutils"
nfullagar@google.com [Wed, 13 Nov 2013 19:12:51 +0000 (19:12 +0000)]
Revert 12382 "Deploy new x86 binutils"

> Deploy new x86 binutils
>
> This puts in place the x86 toolchain using the new 2.24-based binutils.
>
> BUG= https://code.google.com/p/nativeclient/issues/detail?id=3636
> TEST= trybots
> R=bsy@google.com, sehr@chromium.org
>
> Review URL: https://codereview.chromium.org/62643002

TBR=mcgrathr@chromium.org

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

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

5 months agoPNaCl: Fix failure in archived-toolchain tests introduced by r12364
mseaborn@chromium.org [Wed, 13 Nov 2013 02:10:08 +0000 (02:10 +0000)]
PNaCl: Fix failure in archived-toolchain tests introduced by r12364

Adding tests for SJLJ EH support introduced this failure in the
archived-toolchain tests (which run on the PNaCl FYI bots):

scons-out/nacl-x86-32-pnacl-fast-sbtc-pexe-clang/obj/tests/toolchain/eh_virtual_dtor_sjlj.nexe failed: Error 255

This happens because these tests invoke Scons twice:

 * with old toolchain (for front-end), which causes building *_sjlj
   tests to be disabled;
 * with new toolchain (for translator), which causes using *_sjlj
   tests to be enabled.

Fix this by setting TOOLCHAIN_FEATURE_VERSION to the same version for
both runs.

I've added a toolchain_feature_version option to Scons.  An
alternative would be to save/restore the FEATURE_VERSION file, but
that's less robust: it might leave the toolchain in an odd state if we
failed to restore the file on error, which could cause odd problems in
later buildbot runs.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3696
TEST=run archived-toolchain tests via trybots

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

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

5 months agoDeploy new x86 binutils
mcgrathr@chromium.org [Wed, 13 Nov 2013 00:02:34 +0000 (00:02 +0000)]
Deploy new x86 binutils

This puts in place the x86 toolchain using the new 2.24-based binutils.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3636
TEST= trybots
R=bsy@google.com, sehr@chromium.org

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

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

5 months agoPNaCl: Add support for SJLJ-based (setjmp/longjmp) C++ exception handling
mseaborn@chromium.org [Wed, 6 Nov 2013 19:05:54 +0000 (19:05 +0000)]
PNaCl: Add support for SJLJ-based (setjmp/longjmp) C++ exception handling

 * Add "--pnacl-exceptions={none,sjlj,zerocost}" option to
   pnacl-clang/pnacl-ld.  "--pnacl-allow-exceptions" becomes a
   deprecated alias for "--pnacl-exceptions=zerocost" (which I can
   remove after TOOL_REVISIONS is rolled).

 * Add sjlj_eh_redirect.c, which is linked into the pexe when SJLJ EH
   is enabled.  It "renames" __pnacl_eh_sjlj_Unwind_RaiseException()
   to _Unwind_RaiseException() etc.

 * Extend tests/toolchain/nacl.scons to run most of the EH tests in
   SJLJ mode (in addition to the existing zerocost mode).

 * Add the "FEATURE_VERSION" file to the PNaCl toolchain directory so
   the new SJLJ tests can be enabled on the toolchain
   buildbots/trybots before TOOL_REVISIONS is updated.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3696
TEST=run_*_sjlj_test on PNaCl toolchain trybots

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

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

6 months agoUse as/cc/ld flags in all situations
khim@google.com [Tue, 15 Oct 2013 13:49:47 +0000 (13:49 +0000)]
Use as/cc/ld flags in all situations

Mostly cosmetic change but also fixes one unusual case: build
of x86-64 NaCl with i386 toolchain.

TEST=trybots (+look on trybot logs)
R=halyavin@google.com

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

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

6 months agoPNaCl: Allow translator to produce an unsandboxed, native executable
mseaborn@chromium.org [Fri, 11 Oct 2013 06:51:56 +0000 (06:51 +0000)]
PNaCl: Allow translator to produce an unsandboxed, native executable

This only works for targeting x86-32 Linux in this initial version.
This allows pnacl-translate to be invoked with "-arch linux-x86-32".
I'll extend this to work on x86-64 and Mac in later changes.

 * Add a minimal IRT implementation that's just enough to run
   hello_world.pexe.  It implements TLS, mmap(), write(), exit(), etc.
   I'll implement more IRT interfaces in a later change.

 * For testing, add a Buildbot step to test this, and add the
   "pnacl_unsandboxed" option to Scons.

This change is a retry of r12218, with a DEPS change to fix checkdeps,
plus a comment.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3699
TEST=run_hello_world_test_irt bitcode=1 pnacl_unsandboxed=1 --mode=nacl_irt_test

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

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

6 months agoRevert "PNaCl: Allow translator to produce an unsandboxed, native executable"
binji@chromium.org [Tue, 8 Oct 2013 19:43:47 +0000 (19:43 +0000)]
Revert "PNaCl: Allow translator to produce an unsandboxed, native executable"

This reverts commit r12218.

The entire NaCl tree fails with:

Running command: e:\b\depot_tools\python_bin\python_slave.exe tools/checkdeps/checkdeps.py
Using base directory: E:\b\build\slave\xp-newlib-opt\build\native_client
Checking: E:\b\build\slave\xp-newlib-opt\build\native_client
ERROR in E:/b/build/slave/xp-newlib-opt/build/native_client\pnacl\support\unsandboxed_irt.c
Illegal include: "native_client/src/trusted/service_runtime/include/sys/unistd.h"
    Because of no rule applying

FAILED

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3699
TBR=mseaborn@chromium.org

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

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

6 months agoPNaCl: Allow translator to produce an unsandboxed, native executable
mseaborn@chromium.org [Tue, 8 Oct 2013 18:27:20 +0000 (18:27 +0000)]
PNaCl: Allow translator to produce an unsandboxed, native executable

This only works for targeting x86-32 Linux in this initial version.
This allows pnacl-translate to be invoked with "-arch linux-x86-32".
I'll extend this to work on x86-64 and Mac in later changes.

 * Add a minimal IRT implementation that's just enough to run
   hello_world.pexe.  It implements TLS, mmap(), write(), exit(), etc.
   I'll implement more IRT interfaces in a later change.

 * For testing, add a Buildbot step to test this, and add the
   "pnacl_unsandboxed" option to Scons.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3699
TEST=run_hello_world_test_irt bitcode=1 pnacl_unsandboxed=1 --mode=nacl_irt_test

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

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

7 months agoUpdate TOOL_REVISIONS to 12133 to pull in new pnacl directory layout
jvoung@google.com [Tue, 10 Sep 2013 03:47:11 +0000 (03:47 +0000)]
Update TOOL_REVISIONS to 12133 to pull in new pnacl directory layout

This is part 2.  One more part when we roll this into Chrome.
Remove some of the temporary hacks and adjust the rest of
the build scripts.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3618
R=dschuff@chromium.org

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

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

7 months agoRetry move PNaCl drivers out of newlib/bin and into bin, part 1.
jvoung@google.com [Mon, 9 Sep 2013 21:26:51 +0000 (21:26 +0000)]
Retry move PNaCl drivers out of newlib/bin and into bin, part 1.

Also moves newlib/usr/ out to usr/, etc.

Simplify directory layout.
Retry of: https://codereview.chromium.org/22261006

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3618
R=dschuff@chromium.org, sbc@chromium.org

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

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

7 months agoEnable validation caching on ARM.
ncbray@chromium.org [Wed, 4 Sep 2013 04:16:39 +0000 (04:16 +0000)]
Enable validation caching on ARM.

Unlike the x86 validators, the ARM validator is sensitive to the base address
the code is being mapped to.  In practice, however, ELF code segments will not
contain code that touches the position-dependent parts of the ARM validator.
This CL detects when validation is effectively position-independent and only
caches validation in those cases.

BUG= https://code.google.com/p/chromium/issues/detail?id=270430

Review URL: https://chromiumcodereview.appspot.com/23462002

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

7 months agoProviding module information when collecting glibc minidumps.
bradnelson@google.com [Sat, 24 Aug 2013 00:00:44 +0000 (00:00 +0000)]
Providing module information when collecting glibc minidumps.

Extracting information on each module via dl_iterate_phdr. Examining the PT_NOTE section for build_id.

Specifying the dependencies of minidump_generator explicitly in order to support IRT and non-IRT variants.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3607
TEST=dumps work with minidump_dump
R=mseaborn@chromium.org

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

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

7 months agoRemove wrapper-link-and-translate from PNaCl and pnacl_shared_newlib from SCons.
jvoung@google.com [Tue, 20 Aug 2013 20:28:59 +0000 (20:28 +0000)]
Remove wrapper-link-and-translate from PNaCl and pnacl_shared_newlib from SCons.

Most of it was for setting up libraries for
tests/pnacl_ld_experiments, but that has been removed.

This also removes a driver file "wrapper-link-and-translate"
that shouldn't be used by real users.

BUG=none (reverts most of commits for issues 2745 and 2765)
Also reverts https://chromiumcodereview.appspot.com/10416014,
which was not linked to the above issue numbers.

R=mcgrathr@chromium.org

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

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

8 months agoRevert "Rename PNaCl toolchain folder within the SDK."
dschuff@chromium.org [Sat, 10 Aug 2013 06:01:50 +0000 (06:01 +0000)]
Revert "Rename PNaCl toolchain folder within the SDK."
Revert "Move PNaCl drivers from <base>/newlib/bin to <base>/bin."
This reverts r11982 and r11981.
There is too much DEPS roll complexity for this to happen before the branch.
Also update README to reflect the changes.

R=jvoung@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3618
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3617

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

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

8 months agoMove PNaCl drivers from <base>/newlib/bin to <base>/bin.
jvoung@google.com [Sat, 10 Aug 2013 01:41:06 +0000 (01:41 +0000)]
Move PNaCl drivers from <base>/newlib/bin to <base>/bin.

This makes the bin directory easier to find.
Will require more fixups after rolling TOOL_REVISIONS
and after rolling into chrome.  Probably need to change
files similar to:
https://codereview.chromium.org/22540006/

For now, SCons will check both locations.  We need SCons
to continue working so that the translator build can work
(needs to build sdk libs).

Make a env var to keep the spec builders happy for now.
Ugh.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3618
R=dschuff@chromium.org, eliben@chromium.org

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

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

8 months agoPrune some more unnecessary dependencies on old x86 validator.
shcherbina@google.com [Wed, 31 Jul 2013 10:03:56 +0000 (10:03 +0000)]
Prune some more unnecessary dependencies on old x86 validator.

And make related implicit transitive dependencies explicit.

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

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

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

8 months agoRemove pnacl-nmf and GENNMF now that it is removed from chrome scons tests.
jvoung@google.com [Fri, 26 Jul 2013 16:11:12 +0000 (16:11 +0000)]
Remove pnacl-nmf and GENNMF now that it is removed from chrome scons tests.

Removal from chrome: https://codereview.chromium.org/20370002/

Reduce confusion about which driver tools are supported.
This is no longer supported, and the SDK has create_nmf.py,
which works for PNaCl.

BUG=none, cleanup
R=mseaborn@chromium.org

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

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

8 months agoIRT: Replace __attribute__((constructor)) with explicit call in _start()
mseaborn@chromium.org [Sat, 20 Jul 2013 00:40:43 +0000 (00:40 +0000)]
IRT: Replace __attribute__((constructor)) with explicit call in _start()

The previous change to IrtInit() lets us remove the IrtInit()
definition from plugin_main_nacl.cc on the Chrome side.  This change
will let us remove the call to IrtInit() from plugin_main_nacl.cc as
well.

The __attribute__((constructor)) function reportedly wasn't getting
run in the ARM build.  Doing an explicit call to IrtInit() is cleaner
and doesn't rely on linker tricks.

This requires declaring irt_support_private's dependency on libsrpc
etc. in library_deps.py so that tests/irt_compatibility continues to
link.  (Previously, its custom IRT wasn't including the IrtInit()
call.)

Also clean up the build so that irt_entry.o isn't treated specially.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3186
TEST=run_irt_compatibility_test_irt run_random_test_irt + Chrome trybots

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

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

10 months agoCleanup code coverage, switch mac code coverage to 64-bit.
bradnelson@google.com [Wed, 29 May 2013 21:19:18 +0000 (21:19 +0000)]
Cleanup code coverage, switch mac code coverage to 64-bit.

Cleaning up code coverage scripts to use more of the common buildbot code.

Fixing scons build to support coverage-host mode.

Our clang toolchain lacks a 32-bit version of libprofile_rt.
This prevents coverage builds from linking.
Rather than collect no coverage information on mac, for now collect it for the 64-bit build instead.

Dropping unused/untested arm coverage script.

Use linux coverage post-processing script on mac too.
Change the script to emit perf dashboard format.

BUG=None
TEST=None
R=jfb@chromium.org

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

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

11 months agoAdd wrapper library for the nacl_irt_exception_handling IRT interface
mseaborn@chromium.org [Tue, 14 May 2013 18:29:44 +0000 (18:29 +0000)]
Add wrapper library for the nacl_irt_exception_handling IRT interface

Switch src/untrusted/minidump_generator and src/untrusted/crash_dump
over to using the new wrapper library.

Add the wrapper library to the Gyp build.

Minor cleanup to use perror() to report errno status in
minidump_generator.cc.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2401
TEST=run_minidump_test_irt run_untrusted_crash_dump_test_irt

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

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

11 months agoEnable meta-based validation for shared libraries.
ncbray@chromium.org [Mon, 13 May 2013 22:12:28 +0000 (22:12 +0000)]
Enable meta-based validation for shared libraries.

BUG= https://code.google.com/p/chromium/issues/detail?id=224434
R=bsy@google.com

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

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

11 months agoMinidumper: Extend to dump the stack contents
mseaborn@chromium.org [Thu, 9 May 2013 21:38:33 +0000 (21:38 +0000)]
Minidumper: Extend to dump the stack contents

This allows a stack backtrace to be extracted from the minidump.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST=run_minidump_test + manual testing of *.dmp files

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

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

11 months agoGet rid of native_code SCons argument, never default to bitcode=1
mcgrathr@chromium.org [Wed, 1 May 2013 22:29:25 +0000 (22:29 +0000)]
Get rid of native_code SCons argument, never default to bitcode=1

Having bitcode=1 be the default under platform=arm was done back when
there was no non-bitcode option for ARM.  Removing that special case
makes the SCons behavior consistent across all targets: you only get
bitcode if you pass bitcode=1 explicitly.  Places that care already
pass bitcode=1 along with platform=arm.

BUG= none
TEST= trybots
R=dschuff@chromium.org

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

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

11 months agoNever use PNaCl toolchain to build the IRT
mcgrathr@chromium.org [Wed, 1 May 2013 17:50:01 +0000 (17:50 +0000)]
Never use PNaCl toolchain to build the IRT

Since arm-nacl-gcc is capable of building the IRT and that's how the
Chromium/PPAPI IRT will be built from now on, build irt_core.nexe that
way too.  This will make it possible to drop various kinds of kludgery
from the PNaCl build that were done just to enable the IRT build.

BUG= none
TEST= trybots
R=dschuff@chromium.org

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

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

11 months agoAdd code for attaching file origin information to NaClDescs.
ncbray@chromium.org [Fri, 19 Apr 2013 17:52:56 +0000 (17:52 +0000)]
Add code for attaching file origin information to NaClDescs.

This code is unit tested but not yet in use.

BUG= https://code.google.com/p/chromium/issues/detail?id=224434

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

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

11 months agoAdd more metadata for validation caching.
ncbray@chromium.org [Tue, 16 Apr 2013 20:16:18 +0000 (20:16 +0000)]
Add more metadata for validation caching.

BUG= http://code.google.com/p/chromium/issues/detail?id=224434

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

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

12 months agoMake sure Clang-supplied runtime libs come from local Clang
mcgrathr@chromium.org [Tue, 9 Apr 2013 23:17:49 +0000 (23:17 +0000)]
Make sure Clang-supplied runtime libs come from local Clang

When building with Clang, we use a local Clang rather than any one
installed on the system.  So we must ensure that the Clang-supplied
libraries we use are those from the local Clang rather than the system.

It's important to list profile_rt as a library that SCons knows about
rather than an explicit -lprofile_rt switch, so that SCons will notice
when the local Clang profile_rt library has changed in an incremental
build.

BUG= none
TEST= trybots

R=jfb@chromium.org

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

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

12 months agoProvide metadata to validator to allow faster caching.
ncbray@chromium.org [Mon, 1 Apr 2013 23:34:36 +0000 (23:34 +0000)]
Provide metadata to validator to allow faster caching.

This change allows hashless validation caching for the IRT.

BUG= http://code.google.com/p/chromium/issues/detail?id=224434

Review URL: https://chromiumcodereview.appspot.com/12600034

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

12 months agoAdd a scons pnacl finalize step for pnacl_generate_pexe tests.
jvoung@google.com [Thu, 28 Mar 2013 21:11:10 +0000 (21:11 +0000)]
Add a scons pnacl finalize step for pnacl_generate_pexe tests.

Most of the ABI stability steps run as part of pnacl-ld.
However, some steps such as stripping nonstable debug
metadata can make debugging hard.  Thus, we add one more
step to finalize the ABI.

A new scons Bit 'nonstable_bitcode' can be set by individual tests
to opt out of this prep step if the metadata is needed
(e.g., gdb tests).  The test will still run. Add a
commandline flag 'skip_nonstable_bitcode' if it is required
to skip building and running such tests.

An alternative way to opt out is to make the test part of
the nonpexe_test suite.

We need to roll the archived frontend rev too, since finalize
is run during the build portion to properly work with
triggered bots such as the ARM hw bot.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3348
TEST= trybots + buildbot/buildbot_pnacl_toolchain_tests.sh archived-frontend-test x86-64

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

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

12 months agoRemove TARGET_ROOT from list of dirs to pre evaluate.
shcherbina@google.com [Tue, 26 Mar 2013 07:26:17 +0000 (07:26 +0000)]
Remove TARGET_ROOT from list of dirs to pre evaluate.

TARGET_ROOT is subdirectory of DESTINATION_ROOT. If we make DESTINATION_ROOT absolute, so will be TARGET_ROOT.

TEST= bots

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

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

13 months agoSubprocess creation test, along with sel_universal, nonnacl_util, etc changes to...
bsy@google.com [Tue, 12 Mar 2013 20:42:52 +0000 (20:42 +0000)]
Subprocess creation test, along with sel_universal, nonnacl_util, etc changes to make it work.

The real implementation of the subprocess creation hooks are in the plugin code, but it is difficult to test.  we would want a browser test, and that cannot run on the NaCl build bots.  So, we need an implementation in sel_universal that "should" implement the same interface and provide some assurance that if the NaCl build bots succeed, the Chromium bots will too.

This CL changes: the windows standalone launcher to not create a new console; the standalone launcher module to use a zygote process for Linux and OSX, since using it to launch multiple processes result in descriptor inheritance issues; and the reverse service interface to fix a potential race condition, where a process's state information might be freed before the RPC reply for the process creation has been sent.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3318

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

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

13 months agoClean up coverage bots
jfb@chromium.org [Fri, 8 Mar 2013 02:14:44 +0000 (02:14 +0000)]
Clean up coverage bots

The Mac coverage bot has been broken for a while (see bug) and I think
the new Mac GCC is hopelessly beyond repair when it comes to
gcov. Furthermore the NaCl we actually ship on Chrome for Mac is built
with LLVM, it's therefore silly to do coverage with GCC. This CL changes
the Mac coverage bots to use LLVM instead. Some of the tests are
unfortunately broken at the moment, and should get fixed separately
(I'll file a bug once this CL is in). I ran the coverage bots and we do
get coverage results from my change, so even with many tests disabled
things are in a better shape with my change (some coverage, same
compiler as the one we ship NaCl with) than without (no coverage, broken
bot, different compiler).

This CL also cleans up some of the divergences between Mac/Linux/Windows
coverage bots.

TESTS= git try -b nacl-win32-newlib-coverage,nacl-lucid-64-32-newlib-coverage,nacl-lucid-64-64-newlib-coverage,nacl-mac10.6-newlib-coverage
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3283
R= bradnelson@chromium.org

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

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

13 months agoSerialization library. Useful for sending more complex data in RPCs.
bsy@google.com [Tue, 26 Feb 2013 19:47:29 +0000 (19:47 +0000)]
Serialization library.  Useful for sending more complex data in RPCs.

This CL contains a definition for the SerializationBuffer class, which
allows simple numeric types, std::string, and std::vector to be
serialized into a byte buffer for transmission via some IPC mechanism
or for storage.  The SerializationBuffer can be constructed from
received data, and the data elements deserialized.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3318

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

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

14 months agoStyle: Fix various cases to use a consistent capitalisation of "NaCl"
mseaborn@chromium.org [Wed, 30 Jan 2013 22:12:38 +0000 (22:12 +0000)]
Style: Fix various cases to use a consistent capitalisation of "NaCl"

It's not "NaCL" or "Nacl".

BUG=none
TEST=build

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

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

15 months agoMove CPU features into its own static library.
jfb@chromium.org [Mon, 14 Jan 2013 17:04:59 +0000 (17:04 +0000)]
Move CPU features into its own static library.

CPU features has outgrown its original x86-only roots and is used in
more than just the validators. Move it out of there as a second step to
cleaning up this code.

The eventual goal is for CPU features to have similar interfaces for all
CPUs, as well as for some features to work when host and target are
different (e.g. validate an ARM nexe with a certain ARM feature set on
an x86 box).

This CL doesn't change any code beyond:
- moving it;
- updating the includes/include guards;
- fixing silly build scripts.

R= bsy@chromium.org

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

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

15 months agoValidator_ragel: get rid of dfa_validate_x86_xx libraries in scons build.
shcherbina@google.com [Fri, 28 Dec 2012 02:26:07 +0000 (02:26 +0000)]
Validator_ragel: get rid of dfa_validate_x86_xx libraries in scons build.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=3228
TEST= bots

Review URL: https://chromiumcodereview.appspot.com/11662023

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

15 months agoARM validator: remove checked-in nexe tests.
jfb@chromium.org [Wed, 19 Dec 2012 20:56:36 +0000 (20:56 +0000)]
ARM validator: remove checked-in nexe tests.

Auto-generate the nexes from the assembly files instead. This is much
nicer for the trybots because they can't handle checked-in binary files
and fail tests when these get changed.

A few things to note:

 - The tests now only run when platform=arm, and do not run when
   generating pexes.

 - I also had to use C-style comments instead of at-symbols.

 - I added unified ARM syntax annotation, mokey-copy from a test Roland
   added elsewhere.

 - The test test_external_jumps.S wanted to use `b 0` but couldn't.
   It now can, so I added that and left `b _start - 0x20000` too.

 - None of the other assembly files have any code changes.

 - The tests are disabled for Windows, but the entire scons build also
   is disabled for Windows. I'll enable everything but the tests in a
   different CL, and then fix issue #3217 in yet another CL.

R= kschimpf@google.com, mcgrathr@chromium.org, jvoung@chromium.org
TESTS= ./scons platform=arm small_tests
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3194

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

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

16 months agoFix SCons @file logic to work with non-Cygwin GNU tools
mcgrathr@chromium.org [Thu, 13 Dec 2012 19:14:34 +0000 (19:14 +0000)]
Fix SCons @file logic to work with non-Cygwin GNU tools

Tools built by Cygwin (the legacy x86 toolchain) and tools built
without Cygwin (the new ARM toolchain and future toolchains) treat the
@file contents differently vis a vis embedded backslashes.  There is
no perfect solution, but this change is an adequate kludge for our
SCons build to work with either toolchain.  Details are in the comments.

With this, the Windows bot using the arm-nacl-gcc toolchain can be enabled.

BUG= none
TEST= trybots

R=bradnelson@google.com

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

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

17 months agoDo not require toolchains to exist in built_elsewhere=1 mode
mcgrathr@chromium.org [Wed, 14 Nov 2012 00:17:58 +0000 (00:17 +0000)]
Do not require toolchains to exist in built_elsewhere=1 mode

When built_elsewhere=1 is passed to scons, we should not require
that toolchain directories exist.  We get this requirement indirectly
when the PNaClGetNNaClEnv method is used, even though we'll clobber
the settings and not use the toolchain anyway.

BUG= none
TEST= trybots

R=bradnelson@google.com

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

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

17 months agoEnable arm-nacl-gcc for pnacl callingconv_ppapi test
mcgrathr@chromium.org [Tue, 13 Nov 2012 00:05:45 +0000 (00:05 +0000)]
Enable arm-nacl-gcc for pnacl callingconv_ppapi test

Now that there is a toolchain available, this test can be enabled
for proper interoperability testing between the two compilers.

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

R=robertm@google.com

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

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

17 months agoMake naclsdk find ARM toolchains
mcgrathr@chromium.org [Fri, 9 Nov 2012 19:40:51 +0000 (19:40 +0000)]
Make naclsdk find ARM toolchains

The new arm-nacl-gcc toolchain fit the established pattern, so
we just have to use them.  The dictionary mapping platform and
target to toolchain name was just a repetitive way of expressing
the simple uniform formula, so I removed it instead of just adding
'arm' elements.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3086
TEST= trybots + local test of './scons platform=arm native_code=1'

R=bradnelson@google.com

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

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

17 months agoEnable GDB tests for PNaCl
mseaborn@chromium.org [Mon, 22 Oct 2012 21:28:57 +0000 (21:28 +0000)]
Enable GDB tests for PNaCl

Change nacksdk.py to ensure that the GDB path is set up when
env.Bit('bitcode') is set.

Use GetTranslatedNexe() so that these tests can run when using the
sandboxed translator and, more generally, when pnacl_generate_pexe=1.
Tweak GetTranslatedNexe() so that it returns the nexe target rather
than a list containing the nexe target, because tests/gdb/nacl.scons
calls .abspath on the target.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=3091
TEST=./scons gdb_tests bitcode=1

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

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

17 months agoGeneric containers moved into a separate module, split each container into individual...
phosek@chromium.org [Tue, 16 Oct 2012 08:58:39 +0000 (08:58 +0000)]
Generic containers moved into a separate module, split each container into individual source file.

The tests will be provided in the follow up change list as a part of larger refactoring.

BUG=
TESTS=trybots

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

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

18 months ago[MIPS] Implementation of sel_ldr for MIPS architecture.
petarj@mips.com [Mon, 24 Sep 2012 23:11:47 +0000 (23:11 +0000)]
[MIPS] Implementation of sel_ldr for MIPS architecture.

Set of changes needed for sel_ldr support for MIPS architecture.

The commit queue is not working for NaCl at the moment, so we are committing with:
NOTRY=true
However, we have run a try job manually, and it passed fine.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= pnacl/build.sh misc-tools

Review URL: https://chromiumcodereview.appspot.com/10919162

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

18 months agoapoptosis code to detect thread capture. a test injection framework.
bsy@google.com [Thu, 20 Sep 2012 20:42:11 +0000 (20:42 +0000)]
apoptosis code to detect thread capture.  a test injection framework.

the test injection framework allows test behavior to be injected into
the normal program, so there's no need to create a special skeletal
framework to initialize just enough to run the test.  the injection is
by creating a one-line macro invocation at natural junctures in the
code, so that a test-injection table of function pointers can be
checked.  the table is designed so that it is a const table that is
linked into the main executable -- and the table is responsible for
pulling in any "scary" test functions that are not appropriate for a
production release.  with -Wno-missing-initializers, adding to the
test table does not require edits of previously created tests.

the main executable and any tests that do not use the test injection
framework get a null table of test injection function pointers.

also tested by patching into native_client dir in Linux x86-64 chrome
build to ensure that gyp file changes are okay wrt plugin
dependencies.

TEST= run_nacl_thread_capture_test
Review URL: https://chromiumcodereview.appspot.com/10910198

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

19 months agoDEPS in updated pnacl toolchains
dschuff@google.com [Thu, 13 Sep 2012 19:42:17 +0000 (19:42 +0000)]
DEPS in updated pnacl toolchains
This brings in the updated pnacl toolchains: the fat 32/64 bit linux toolchain
and the 64 bit mac toolchain.

R=jvoung@chromium.org,noelallen,bradn
BUG=none

Review URL: https://chromiumcodereview.appspot.com/10914239

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

19 months agoMake pnacl toolchain tester bot find the right toolchain.
jvoung@google.com [Tue, 11 Sep 2012 18:31:43 +0000 (18:31 +0000)]
Make pnacl toolchain tester bot find the right toolchain.
SCons currently no longer supports 64-bit sdks, but the
tester bots: download the 32-bit host TC, clobber the 32-bit
host tc, build a 64-bit one and then fail to find the
32-bit one.

This adds a pnaclsdk_mode="custom:<path>" flag so that we
can redirect scons to the "right" toolchain, e.g., while
running "pnacl/build.sh sdk newlib" we can pick the TC that
we had just built, and while running the archived frontend
test we can pick the archived frontend.

Also move some of the 32-bit vs 64-bit configuration stuff
closer together.

Call out some of the rest of the hardcoded paths that we
will need to change.

BUG= red bots!
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2922
TEST=bash buildbot/buildbot_pnacl_toolchain_tests.sh tc-test-bot x86-64

Review URL: https://chromiumcodereview.appspot.com/10919196

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

19 months agoChange naclsdk.py site tool to chose only 32 bit pnacl toolchain.
noelallen@google.com [Sun, 9 Sep 2012 22:06:35 +0000 (22:06 +0000)]
Change naclsdk.py site tool to chose only 32 bit pnacl toolchain.

trb=dschuff@google.com
Review URL: https://chromiumcodereview.appspot.com/10910152

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

19 months agoCreate a "sel_main_chrome" Gyp library for Chromium to depend on
mseaborn@chromium.org [Tue, 4 Sep 2012 23:44:43 +0000 (23:44 +0000)]
Create a "sel_main_chrome" Gyp library for Chromium to depend on

This will allow the Chromium Gyp files to be cleaned up so that they
do not depend on "sel" or "platform_qualify" directly but instead just
depend on this single entry point target.

Also change the Scons build similarly and change it to reflect the
real dependencies between components.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2832
TEST=build

Review URL: https://chromiumcodereview.appspot.com/10909069

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

19 months agoRefactor ppapi libs scons build description.
bradnelson@google.com [Wed, 22 Aug 2012 21:57:35 +0000 (21:57 +0000)]
Refactor ppapi libs scons build description.

Inlining PPAPI_LIBS and NON_PPAPI_BROWSER_LIBS.
Now the chrome_browser_tests is only supported with the IRT,
inline PPAPI_LIBS and NON_PPAPI_BROWSER_LIBS.
Leaving PPAPI_LIBS for now as chrome side still uses it.

Add ppapi_cpp -> ppapi and testrunner_browser -> ppapi dependencies in library_deps.py and use where we can.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2957
TEST=None
R=mseaborn@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10872020

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

19 months agoDebug stub: Move port/* and gdb_rsp/* into debug_stub/
mseaborn@chromium.org [Fri, 17 Aug 2012 22:08:47 +0000 (22:08 +0000)]
Debug stub: Move port/* and gdb_rsp/* into debug_stub/

The "port" directory is poorly named, and there is no particular need
to split the debug stub between "debug_stub" and "gdb_rsp"
directories.  Moving the files will allow the debug stub to be
simplified further.

Merge gdb_rsp.gyp into debug_stub.gyp.

Merge gdb_rsp/build.scons into debug_stub/build.scons.

Remove the unused file port.gyp.

Remove gdb_rsp/OWNERS, which is the same as debug_stub/OWNERS.

Merge the "debug_stub_init" library into "debug_stub", since we no
longer have a circular dependency between "debug_stub" and "gdb_rsp".

The dependency of "sel" on "debug_stub" was removed in an earlier
change, so the comment in service_runtime/build.scons about a circular
dependency can be removed.

Remove an incorrect comment about PPAPI from debug_stub/build.scons
and remove an obsolete comment about Linux/Mac.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2897
TEST=Scons and Gyp builds

Review URL: https://chromiumcodereview.appspot.com/10834366

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

20 months agoCleanup: Remove unused #defines of "_WINDOWS" and "_CONSOLE"
mseaborn@chromium.org [Sat, 11 Aug 2012 02:22:57 +0000 (02:22 +0000)]
Cleanup: Remove unused #defines of "_WINDOWS" and "_CONSOLE"

Nothing in the NaCl or PPAPI trees uses these symbols.

BUG=none
TEST=build

Review URL: https://chromiumcodereview.appspot.com/10854101

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

20 months agoAdd a "hello world" test for the zero-based sandbox.
arbenson@google.com [Thu, 9 Aug 2012 17:52:36 +0000 (17:52 +0000)]
Add a "hello world" test for the zero-based sandbox.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2927
TEST=./scons run_hello_world_test \
x86_64_zero_based_sandbox=1 bitcode=1 platform=x86-64

Review URL: https://chromiumcodereview.appspot.com/10855042

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

20 months agoDebug stub: Test single-stepping/continuing with other threads suspended
mseaborn@chromium.org [Thu, 9 Aug 2012 01:35:38 +0000 (01:35 +0000)]
Debug stub: Test single-stepping/continuing with other threads suspended

The debug stub allows GDB to single-step or a continue one thread
while all other threads remain suspended.  This change adds tests to
cover this.  The test checks that other threads remain properly
suspended.

This is in preparation for changing how the debug stub suspends
threads -- the new test catches bugs in my work-in-progress change
which are otherwise not detected.

This test checks whether variables get modified by suspended threads.
We use "nm" to find variables' addresses.  I'm not attempting to make
this work with non-ARM PNaCl.  I've changed the nacl.scons file to use
AllowInlineAssembly() for consistency with other assembly-using tests
where we don't attempt to get x86 inline assembly to work with PNaCl.

We move AssertReplySignal() to the top level so that it can be used by
the new tests, which are in a separate class to provide a new scope
for clarity.  This involves defining an AssertEquals() that is usable
outside of the class.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2948
TEST=run_debug_stub_test

Review URL: https://chromiumcodereview.appspot.com/10829230

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

20 months agovalidator_ragel: replace a run-time switch with compile time switch
pasko@google.com [Tue, 17 Jul 2012 13:09:12 +0000 (13:09 +0000)]
validator_ragel: replace a run-time switch with compile time switch

By default the build assumes we want the current production validator.
To build with the new validator:
* with scons:
  validator_ragel=1
* with GYP:
  GYP_DEFINES=nacl_validator_ragel=1

One problem: the library dependencies change with flipping the validator_ragel
flag in scons, hence we cannot use a static table of library dependencies in
library_deps.py.

Modified library_deps.py to add certain validator libraries to the link sequence depending on how "validator_ragel" bit is set. Design-wise, it is not beautiful to make library_deps.py be aware of command-line flags, but it's the most compact change we found to do the job.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2868
TEST=GYP_DEFINES=nacl_validator_ragel=1 ./native_client/build/gyp_nacl && make
TEST=cd native_client && ./scons -j8 --mode=dbg-host --validator_ragel platform=x86-64

Review URL: https://chromiumcodereview.appspot.com/10700114

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

21 months agoAdd an alias 'pnacl_support_extension' for rebuilding the pnacl
jvoung@google.com [Tue, 10 Jul 2012 17:47:01 +0000 (17:47 +0000)]
Add an alias 'pnacl_support_extension' for rebuilding the pnacl
extension during testing.  Also move the output directory to a fixed
subdir of scons-out instead of a fixed dir under chromebinaries so
that it is easier to clobber (rather than clobber chromebinaries).

Since scons dependency checking doesn't seem to work with
the toolchain directory, we also always build this now.

BUG= none
TEST= trybots

Review URL: https://chromiumcodereview.appspot.com/10704015

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

21 months agoDropping unused wix tool + dependency.
bradnelson@google.com [Tue, 3 Jul 2012 23:03:24 +0000 (23:03 +0000)]
Dropping unused wix tool + dependency.

This might have been used for the firefox installer at some point.
Dropping it.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2889
TEST=None
R=bradchen@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10700096

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

21 months agoClean up toolchain command/option selection
mcgrathr@chromium.org [Fri, 29 Jun 2012 16:55:21 +0000 (16:55 +0000)]
Clean up toolchain command/option selection

This cleans up the selection of native-code toolchain details to be
more clear and table-driven.  It also drops the support for the
obsolete style of tool names such as 'nacl-gcc' and 'nacl64-gcc'.
This now works for the existing standard cases, and also for
naclsdk_mode=custom:... specifying a next-generation toolchain
that uses 'arm-nacl-...' or 'i686-nacl-...'.

BUG= none
TEST= trybots

R=bradnelson@google.com

Review URL: https://chromiumcodereview.appspot.com/10704036

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

21 months agoAdd a test for sel_main_chrome.c
mseaborn@chromium.org [Mon, 25 Jun 2012 22:02:35 +0000 (22:02 +0000)]
Add a test for sel_main_chrome.c

The existing sel_main_chrome_test.c only checked that
sel_main_chrome.c can be linked successfully, and did not try to run
it.  Since I broke sel_main_chrome.c in r8988 (fixed in r8997), it's
time to improve the test to catch this kind of mistake.

We extend the test to use sel_main_chrome.c to run hello_world.nexe
and check its output.

Change library_deps.py to declare some of the "sel" library's
dependencies.

Fix nacl_valgrind_hooks.h to be #includable from C++.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2758
TEST=run_sel_main_chrome_test

Review URL: https://chromiumcodereview.appspot.com/10604003

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

21 months agoRefactor the process of choosing validators.
pasko@google.com [Fri, 22 Jun 2012 10:11:10 +0000 (10:11 +0000)]
Refactor the process of choosing validators.

On startup make a choice of validator implementation: write the choice as
function pointers in NaClApp.  This opens a possibility to add more experimental
validators (such as MIPS) without having to add platform-specific stub
implementations.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2737
TEST=functionality must be left unchanged

Review URL: https://chromiumcodereview.appspot.com/10134056

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

22 months agoCleanup some unused flags related to pnacl's sandboxed translator built as a
robertm@chromium.org [Tue, 12 Jun 2012 18:21:29 +0000 (18:21 +0000)]
Cleanup some unused flags related to pnacl's sandboxed translator built as a
shared image.

These became obsolete after:
http://codereview.chromium.org/10546057/

BUG= none
TEST= manual

Review URL: https://chromiumcodereview.appspot.com/10536091

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

22 months agoRemove flag passed to pnacl translators which has no effect
robertm@chromium.org [Sat, 9 Jun 2012 01:59:38 +0000 (01:59 +0000)]
Remove flag passed to pnacl translators which has no effect
as 'USE_DEFAULT_CMD_LINE': '1' (driver_env.py)

Review URL: https://chromiumcodereview.appspot.com/10532076

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

22 months agoInitial patch for MIPS architecture that includes implementation of the validator...
petarj@mips.com [Fri, 1 Jun 2012 15:59:30 +0000 (15:59 +0000)]
Initial patch for MIPS architecture that includes implementation of the validator, as well as the test code and script changes that enable building MIPS binutils and test executables.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2275
TEST=pnacl/build.sh misc-tools ; src/trusted/validator_mips/testdata/compile_tests.sh

Review URL: https://chromiumcodereview.appspot.com/9979025

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

22 months agoSCons build tweaks to enable using a custom native ARM toolchain
mcgrathr@chromium.org [Fri, 1 Jun 2012 00:05:41 +0000 (00:05 +0000)]
SCons build tweaks to enable using a custom native ARM toolchain

These tweaks add the native_code=1 option to the SCons command line, which
counteracts the otherwise default bitcode=1 when platform=arm.  Also tweak
various SCons files so that ARMness and bitcodeness are properly separated.
For now, this only really works when using naclsdk_mode=custom:... to point
at a hand-built arm-nacl native toolchain.

BUG= none
TEST= trybots

R=sehr@google.com

Review URL: https://chromiumcodereview.appspot.com/10442070

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

22 months agoscons support for building pnacl shared libs via bitcode
robertm@google.com [Wed, 23 May 2012 20:41:31 +0000 (20:41 +0000)]
scons support for building pnacl shared libs via bitcode

The main problems addressed here is that the notion of
bitcode and native file is not quite compatible with
scons' way of doing things (assuming pnacl_geneate_pexe=0).
Currently we just build everything as native code and even the bitcode
link uses native code.

The solution is to pretend everything is native but make
sure that bitcode intermediate files (i.e. libraries)
are copied to the staging directories.

A wrapper scripts bridges the gap between the bitcode
world and the native code.
The script is similar to a driver but intentionally named differently
as it is not a suggested way of using the toolchain.
The script is kept simple and only meant to handle our scons usage scenarios.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2765
TESTS= manual
Review URL: https://chromiumcodereview.appspot.com/10386210

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

22 months agoTest for debug stub with real gdb.
halyavin@google.com [Mon, 21 May 2012 09:21:09 +0000 (09:21 +0000)]
Test for debug stub with real gdb.
Glibc not supported because corresponding changes to gdb
haven't committed yet.
I have to remove the flag that libraries enumeration is
supported by debug stub since new version of gdb produces
errors.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2764
TEST=scons platform=... --mode=nacl,opt-host run_stepi_after_break_test
Review URL: https://chromiumcodereview.appspot.com/10350007

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

23 months agovalidator_ragel: Link into TCB, use under env var
pasko@google.com [Tue, 24 Apr 2012 11:04:08 +0000 (11:04 +0000)]
validator_ragel: Link into TCB, use under env var

In both Chrome and sel_ldr environment variable
NACL_DANGEROUS_USE_DFA_VALIDATOR is used to replace the current validator with
the new one.

WARNING:
WARNING:
WARNING: The size increase of the runnable binaries resulted by this change will
likely trigger the "perf_expectation" regression when this change gets pulled
into Chrome via DEPS roll.

Size implications:

0. absolute values of size increase are equal among sel_ldr, nacl_helper and the
   chrome binary. On Linux the validator library gets pulled into the
   downloadable chrome package twice (in nacl_helper and chrome).

1. 32bit validator size is negligible (within 40K on each platform uncompressed)

2. with 64 validator there are 2 cases: Linux and Windows.

2.1. On Linux the optimized stripped sel_ldr gets increased by 400K (was: 510K).
     The 7zipped size increase for nacl_helper is 108K (was: 884K).

2.2. On Windows the optimized sel_ldr gets increased by 1MB (was: 955K). When
     7zipped the increase is 101K (great compression!). When we get to optimize
     the Windows64 build the uncompressed size increase is expected to be
     significantly smaller: about 350K. This is a work in progress.

Overall package size increase is expected to be:
Windows64:
  7zipped      - about 101K
  uncompressed - about 1MB (can be reduced later)
Linux64:
  7zipped      - about 216K
  uncompressed - about 800K
Windows32, all MacOS variants:
  uncompressed - less than 40K
Linux32:
  uncompressed - less than 80K

Linking another validator in statically has the advantage of being able to run
two validators side by side for some time taking the current validator's answer
as authoritative. Also, it does not increase the hassle in the build and
deployment systems which we have a lot already.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2597
TEST=./scons --mode=dbg-host platform=x86-64 run_dfa_validator_hello_world_test

Review URL: https://chromiumcodereview.appspot.com/10070010

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

23 months agoScons: Move some library dependency declarations into library_deps.py
mseaborn@chromium.org [Fri, 20 Apr 2012 21:48:14 +0000 (21:48 +0000)]
Scons: Move some library dependency declarations into library_deps.py

Declare dependencies of the 'sel' library in order to fix some of the
worst duplication.

Change the code in library_deps.py to take dependencies for 'sel' from
both LIBRARY_DEPENDENCIES_DEFAULT and PLATFORM_LIBRARY_DEPENDENCIES.
Replace the transitive-closure implementation in library_deps.py with
one that is simpler and easier to understand.

BUG=none
TEST=build

Review URL: https://chromiumcodereview.appspot.com/10167012

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

23 months agoScons: Remove duplication of VALIDATOR_LIBS list and use library_deps.py instead
mseaborn@chromium.org [Fri, 20 Apr 2012 06:35:03 +0000 (06:35 +0000)]
Scons: Remove duplication of VALIDATOR_LIBS list and use library_deps.py instead

BUG=none
TEST=build

Review URL: https://chromiumcodereview.appspot.com/10158002

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

23 months agoRemove references to SDL from the Scons build
mseaborn@chromium.org [Thu, 19 Apr 2012 17:42:59 +0000 (17:42 +0000)]
Remove references to SDL from the Scons build

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

Review URL: https://chromiumcodereview.appspot.com/10117035

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

2 years agoWrap AR command lines in a temp file as well, in case it gets
jvoung@google.com [Tue, 3 Apr 2012 00:24:27 +0000 (00:24 +0000)]
Wrap AR command lines in a temp file as well, in case it gets
too long, e.g., for the pnacl windows toolchain bot.

Previously, this only happened for link commands.

BUG= bot redness
TEST= trybots

Review URL: https://chromiumcodereview.appspot.com/9968063

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

2 years agoRemove code for non-clang frontends from SConstruct and naclsdk.py
robertm@google.com [Fri, 30 Mar 2012 19:17:15 +0000 (19:17 +0000)]
Remove code for non-clang frontends from SConstruct and naclsdk.py

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2697
Review URL: https://chromiumcodereview.appspot.com/9882001

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

2 years agoRefactor buildbot_pnacl.sh and implement new test scheme git-svn
dschuff@google.com [Fri, 30 Mar 2012 15:42:20 +0000 (15:42 +0000)]
Refactor buildbot_pnacl.sh and implement new test scheme
This CL makes pnacl_generate_pexe=1 the default and tests the nonpexe_tests
separately. It also simplifies buildbot_pnacl.sh

R= jvoung@google.com,sehr@google.com,robertm@google.com
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2609
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2407
TEST= pnacl tests

Review URL: https://chromiumcodereview.appspot.com/9791026

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

2 years agoEnable some sandboxed translation tests
dschuff@google.com [Mon, 26 Mar 2012 23:32:08 +0000 (23:32 +0000)]
Enable some sandboxed translation tests
Except do it right this time.
Summary:
Use the standalone sandboxed translator driver for all arches in sbtc mode.
Don't stub-out the translate command; actually translate.
Adjust buildbot scripts to run the right tests, and don't build the
prerequisites on arm hw

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2407
TEST= arm bots

Review URL: https://chromiumcodereview.appspot.com/9853033

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

2 years agoRevert the part of 8104 that broke the build
dschuff@google.com [Mon, 26 Mar 2012 15:54:42 +0000 (15:54 +0000)]
Revert the part of 8104 that broke the build

R= robertm
BUG=none
TEST=arm bots

Review URL: https://chromiumcodereview.appspot.com/9857013

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

2 years agoEnable some sandboxed translator tests on arm hardware
dschuff@google.com [Sat, 24 Mar 2012 00:23:02 +0000 (00:23 +0000)]
Enable some sandboxed translator tests on arm hardware
Also use the driver in the pnacl_translator directory for sandboxed translation on all architectures.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2407
TEST= all arm

Review URL: https://chromiumcodereview.appspot.com/9836060

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

2 years agoComplete changes of tarball names, roll DEPS to get first newly-named tarballs.
sehr@google.com [Fri, 23 Mar 2012 23:19:31 +0000 (23:19 +0000)]
Complete changes of tarball names, roll DEPS to get first newly-named tarballs.
BUG=  http://code.google.com/p/nativeclient/issues/detail?id=2547
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9835060

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

2 years agoChange built_elsewhere flag to work with pexe mode
dschuff@google.com [Thu, 22 Mar 2012 17:59:15 +0000 (17:59 +0000)]
Change built_elsewhere flag to work with pexe mode
Instead of ignoring all dependencies for a test target, we replace the builders (CC CXX et al) except for translate with no-ops.

Also run some basic pexe mode tests on arm, and tweak the pruning process before uploading to the hw bot( and give the tarball a better name).

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2609
TEST=bots

Review URL: https://chromiumcodereview.appspot.com/9824001

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

2 years agoEmit brief command strings for pexe translation.
dschuff@google.com [Fri, 16 Mar 2012 00:22:54 +0000 (00:22 +0000)]
Emit brief command strings for pexe translation.
Also fixes the strip command to do the same.

R=ncbray@google.com,mseaborn@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9703089

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

2 years agoScons: Simplify GetTranslatedNexe()
mseaborn@chromium.org [Wed, 14 Mar 2012 23:39:14 +0000 (23:39 +0000)]
Scons: Simplify GetTranslatedNexe()

Use Scons's automatic dependency tracking.

Remove unused "trans_flags" variable.

This addresses some review comments from
https://chromiumcodereview.appspot.com/9696046/.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2609
TEST=small_tests bitcode=1 pnacl_stop_with_pexe=1

Review URL: https://chromiumcodereview.appspot.com/9695064

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

2 years agoRename pnacl_stop_with_pexe to pnacl_generate_pexe
dschuff@google.com [Tue, 13 Mar 2012 23:33:11 +0000 (23:33 +0000)]
Rename pnacl_stop_with_pexe to pnacl_generate_pexe
Since we actually do want to translate and run tests, and not
stop.
(see https://chromiumcodereview.appspot.com/9696046/ )

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2609
TEST=pnacl_generate_pexe tests

Review URL: https://chromiumcodereview.appspot.com/9691062

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

2 years agoAdd test running support for tests generated as pexes.
dschuff@google.com [Tue, 13 Mar 2012 21:48:55 +0000 (21:48 +0000)]
Add test running support for tests generated as pexes.
Hooks into CommandSelLdrTestNacl et al to make the translation part of the test.

R=robertm,jvoung,sehr,Karl
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2609
TEST=smoke_tests,large_tests

Review URL: https://chromiumcodereview.appspot.com/9696046

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

2 years agoUse SCons feature to hide long command lines in temporary files on Windows
mcgrathr@chromium.org [Sat, 10 Mar 2012 00:09:11 +0000 (00:09 +0000)]
Use SCons feature to hide long command lines in temporary files on Windows

Some of our linking commands have grown so long they hit some Windows
limits on command line length.  Fortunately, the toolchain and SCons
support a way to work around the limitation.

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

R=dschuff@google.com

Review URL: https://chromiumcodereview.appspot.com/9665023

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

2 years agoDisallow pnacl_stop_with_pexe with --nacl_glibc x86-64 for now,
jvoung@google.com [Wed, 7 Mar 2012 22:09:10 +0000 (22:09 +0000)]
Disallow pnacl_stop_with_pexe with --nacl_glibc x86-64 for now,
and allow a few libs to be built under --nacl_glibc for now.

(Alleviate x86-64 toolchain bot redness)

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2630

TEST=

Review URL: https://chromiumcodereview.appspot.com/9623014

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

2 years agoAdd a new scons variabe "pnacl_stop_with_pexe" which will prevent pnacl from
robertm@google.com [Fri, 2 Mar 2012 21:26:29 +0000 (21:26 +0000)]
Add a new scons variabe "pnacl_stop_with_pexe" which will prevent pnacl from
producing any native images - just pexes.

Tests will not work with this setting and it is mostly useful for
generating pre-build binaries like so:

./scons platform=arm bitcode=1   do_not_run_tests=1 run_sleep_test  pnacl_stop_with_pexe=1

This will generate the pexe necessary to run the test run_sleep_test.

NOTE: There seems to be a problem with the pexes not being moved into
the staging dir

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2630
Review URL: https://chromiumcodereview.appspot.com/9570034

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

2 years ago* redirect.bat: Remove fixed-location PATH hack. Instead, the driver now expects...
pdox@google.com [Sat, 18 Feb 2012 16:01:46 +0000 (16:01 +0000)]
* redirect.bat: Remove fixed-location PATH hack. Instead, the driver now expects "python" to be in the %PATH%.

* naclsdk.py: Add ../third_party/python_26 to the PATH for the PNaCl driver, when invoked from SCons.

* driver_tools.py: Add missing pathtools.tosys

* driver_env.py:
Use "clang -ccc-cxx" instead of "clang++" for C++ compilation.
"clang++" is a symlink, which is not executable from Windows Python.

TBR= jvoung
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2286
Review URL: https://chromiumcodereview.appspot.com/9355028

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

2 years agoAdding untrusted crash dump / stack trace tests.
bradnelson@google.com [Fri, 17 Feb 2012 17:14:27 +0000 (17:14 +0000)]
Adding untrusted crash dump / stack trace tests.
This demonstrates using hardware exception handling support to produce
stack traces in crashed modules.

Not yet handled:
  - 64-bit
  - registers
  - upload of dumps
  - call frame variable/parameter decoding

BUG=http://code.google.com/p/nativeclient/issues/detail?id=2595
TEST=untrusted_crash_dump_test,inbrowser_untrusted_crash_dump_test
R=mseaborn@chromium.org,ncbray@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9316125

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

2 years agoTurn on testing of default commandlines for the pnacl sandboxed translator.
jvoung@google.com [Thu, 9 Feb 2012 18:51:51 +0000 (18:51 +0000)]
Turn on testing of default commandlines for the pnacl sandboxed translator.
Review URL: https://chromiumcodereview.appspot.com/9365028

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

2 years agoAccidentally committed scons part before toolchain was ready... plus other issues...
jvoung@google.com [Tue, 7 Feb 2012 06:01:53 +0000 (06:01 +0000)]
Accidentally committed scons part before toolchain was ready... plus other issues with the ARM IRT.

TBR=ncbray@google.com
Review URL: https://chromiumcodereview.appspot.com/9350009

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

2 years agoPnacl driver / test-script support for pnacl LLC/LD default commandlines.
jvoung@google.com [Tue, 7 Feb 2012 01:54:06 +0000 (01:54 +0000)]
Pnacl driver / test-script support for pnacl LLC/LD default commandlines.

Make scons use_sandboxed_translator=1 use the default command lines
where possible to ensure this is tested.

Some tests deviate from the normal use case. In those situations,
the driver will detect it and revert back to a custom commandline.

Pull in LD change: http://codereview.chromium.org/9314012/
Pull in LLC change: http://codereview.chromium.org/9309017/
Review URL: https://chromiumcodereview.appspot.com/9315012

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