Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(732)

Issue 7265001: Build and use libraries locally in the nacl build, not requiring "partial SDK" (Closed)

Created:
9 years, 6 months ago by Roland McGrath
Modified:
9 years, 5 months ago
CC:
native-client-reviews_googlegroups.com, der Springer
Visibility:
Public.

Description

Build and use libraries locally in the nacl build, not requiring "partial SDK" This is the major piece of retiring the "partial SDK" concept. The --mode=nacl_extra_sdk build is still intact and works as before, but is longer necessary for building a nacl tree from scratch with local updates to all the libraries whose source is in this tree. One component of this is to substantially unify the compilation flags in the nacl and nacl_extra_sdk environments, which had grown apart by bit-rot. The various libraries are now compiled in both environments (and some of them also in the nacl_irt environment), so the set of -D macros that the library code requires must be consistent across the environments. Another issue is that the C preprocessor implicitly suppresses various warnings when the code provoking them appears in a "system header file". Files in the toolchain/.../include directories count as system headers, so this was masking some cruft in two tests. Now that we are instead finding the headers locally via -Iscons-out/.../include, they are no longer considered system headers and the warnings (which are errors with -Werror) are not suppressed. This is what necessitated the two actual code changes. http://code.google.com/p/nativeclient/issues/detail?id=1654 was mentioned in one of those places, but has been obsolete for a long time. There are various bits of scons magic required to correctly express all the dependencies on header files and libraries. These didn't matter before when scons didn't have to build/install those files because the compilers just found them implicitly in toolchain directories. Now everything that can come from the local nacl tree does come from the local nacl tree, so scons has to know about all the dependencies to build libraries into scons-out/.../lib and copy headers into scons-out/.../include. Later changes will finish the job by providing new ways to install the public headers and libraries into an SDK, and then finally getting rid of nacl_extra_sdk entirely. PNaCl is another can of worms not yet addressed. BUG=http://code.google.com/p/nativeclient/issues/detail?id=1859 TEST=trybots & toolchain trybots R=bradnelson@google.com,ncbray@google.com,bradchen@google.com Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=5852

Patch Set 1 #

Patch Set 2 : rebased #

Patch Set 3 : windows .s/.S horror #

Total comments: 11

Patch Set 4 : review nits, windows kludge fixed, rebased #

Patch Set 5 : rebased + tweaks for pnacl #

Patch Set 6 : need libehsupport for irt #

Patch Set 7 : disable optimization for pnacl extrasdk #

Patch Set 8 : tweaks for pnacl with updated driver #

Total comments: 1

Patch Set 9 : fixed comment typo #

Patch Set 10 : one more hack for pnacl #

Patch Set 11 : final fix for pnacl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -135 lines) Patch
M SConstruct View 1 2 3 4 5 6 7 8 9 10 18 chunks +190 lines, -89 lines 0 comments Download
M site_scons/site_tools/component_builders.py View 1 2 3 3 chunks +10 lines, -2 lines 0 comments Download
M site_scons/site_tools/naclsdk.py View 1 2 3 4 2 chunks +6 lines, -9 lines 0 comments Download
M src/untrusted/ehsupport/nacl.scons View 1 2 3 4 5 6 7 1 chunk +3 lines, -16 lines 0 comments Download
M src/untrusted/irt_stub/nacl.scons View 2 chunks +20 lines, -6 lines 0 comments Download
M src/untrusted/pthread/nacl.scons View 1 chunk +7 lines, -5 lines 0 comments Download
M tests/ppapi_example_audio/audio.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -4 lines 0 comments Download
M tests/threads/thread_test.c View 2 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Roland McGrath
This is not ready for commit until we figure out the pnacl situation, but the ...
9 years, 6 months ago (2011-06-24 21:38:03 UTC) #1
Brad Chen
This looks great to me, however (stating the obvious) Brad Nelson and Nick know the ...
9 years, 6 months ago (2011-06-25 13:50:10 UTC) #2
bradn
Otherwise LGTM http://codereview.chromium.org/7265001/diff/1009/SConstruct File SConstruct (right): http://codereview.chromium.org/7265001/diff/1009/SConstruct#newcode2429 SConstruct:2429: RPATH_LINK_FLAGS = '$( ${_concat(RPATHLINKPREFIX, LIBPATH, RPATHLINKSUFFIX, __env__, ...
9 years, 6 months ago (2011-06-25 21:03:55 UTC) #3
robertm
http://codereview.chromium.org/7265001/diff/1009/SConstruct File SConstruct (right): http://codereview.chromium.org/7265001/diff/1009/SConstruct#newcode1901 SConstruct:1901: pre_base_env.Append( Are those defines now visible to the "pnacl ...
9 years, 6 months ago (2011-06-27 14:55:15 UTC) #4
Roland McGrath
On 2011/06/25 21:03:55, bradn wrote: > Otherwise LGTM > > http://codereview.chromium.org/7265001/diff/1009/SConstruct > File SConstruct (right): ...
9 years, 6 months ago (2011-06-27 16:42:23 UTC) #5
Roland McGrath
On 2011/06/27 14:55:15, robertm wrote: > http://codereview.chromium.org/7265001/diff/1009/SConstruct > File SConstruct (right): > > http://codereview.chromium.org/7265001/diff/1009/SConstruct#newcode1901 > ...
9 years, 6 months ago (2011-06-27 16:48:13 UTC) #6
robertm
http://codereview.chromium.org/7265001/diff/1009/SConstruct File SConstruct (right): http://codereview.chromium.org/7265001/diff/1009/SConstruct#newcode1901 SConstruct:1901: pre_base_env.Append( On 2011/06/27 14:55:15, robertm wrote: > Are those ...
9 years, 6 months ago (2011-06-27 17:57:34 UTC) #7
Nick Bray
http://codereview.chromium.org/7265001/diff/1009/SConstruct File SConstruct (right): http://codereview.chromium.org/7265001/diff/1009/SConstruct#newcode2366 SConstruct:2366: CPPPATH = ['${SOURCE_ROOT}', '${SOURCE_ROOT}/gpu'], Suggestion: linebreak the paths, comment ...
9 years, 6 months ago (2011-06-27 19:52:26 UTC) #8
Roland McGrath
On 2011/06/27 19:52:26, Nick Bray wrote: > http://codereview.chromium.org/7265001/diff/1009/SConstruct > File SConstruct (right): > > http://codereview.chromium.org/7265001/diff/1009/SConstruct#newcode2366 ...
9 years, 6 months ago (2011-06-27 20:11:21 UTC) #9
Nick Bray
LGTM http://codereview.chromium.org/7265001/diff/11010/SConstruct File SConstruct (right): http://codereview.chromium.org/7265001/diff/11010/SConstruct#newcode2376 SConstruct:2376: # ${SOURCE_ROOT}/gpu for #include <GLES2/...>" Typo
9 years, 5 months ago (2011-06-28 21:53:30 UTC) #10
Matt Ball
Roland (et al), could you CC me in future partial SDK changes? I need to ...
9 years, 5 months ago (2011-06-29 16:35:40 UTC) #11
Use chromium.org instead
I haven't yet done the stages that should break any existing uses, and will coordinate ...
9 years, 5 months ago (2011-06-29 17:15:45 UTC) #12
Matt Ball
9 years, 5 months ago (2011-06-29 17:27:24 UTC) #13
On 2011/06/29 17:15:45, mcgrathr wrote:
> I haven't yet done the stages that should break any existing uses, and will
> coordinate those with you.

Thank you very much!

Currently, the SDK is already slightly broken because it uses the pre-compiled
pepper libraries from the toolchain tarball but manually copies the ppapi header
files into the SDK installer's toolchain directory with a different revision. 
I'm trying to fix this now by building the libraries from within a native client
repository and copying the libraries into the SDK installer toolchain, but would
prefer to avoid using --mode=nacl_extra_sdk since this is going away soon.

I'm hoping that some of this work will allow me to easily achieve this goal.

Cheers,
-Matt

Powered by Google App Engine
This is Rietveld 408576698