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

Side by Side Diff: ppapi/native_client/src/untrusted/pnacl_irt_shim/nacl.scons

Issue 10950042: PNaCl: Build a PPAPI shims library for all architectures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 Import('env') 6 Import('env')
7 import os
8 7
9 # This library is part of the pnacl x86-64 toolchain only, and is used 8 # This library contains PNaCl ABI shims which convert between the
10 # to match the pnacl ABI to the IRT ABI. It was necessitated by problems 9 # x86-64 calling conventions used by the IRT library (which uses gcc's
11 # in passing structures by value on x86-64. 10 # ABI) and those used by the PNaCl translator. It was necessitated by
12 if not env.Bit('bitcode') or not env.Bit('target_x86_64'): 11 # problems in passing structures by value on x86-64.
12 #
13 # We build the library on all architectures so that we can use the
14 # same entry point symbol everywhere. On architectures other than
15 # x86-64, the library currently does no calling conventions
16 # conversion.
17 if not env.Bit('bitcode'):
13 Return() 18 Return()
14 19
15 # The library must be compiled with nacl-gcc. 20 # The library must be compiled with nacl-gcc.
16 # Clear out the pnacl_generate_pexe bit to allow building this as a 21 # Clear out the pnacl_generate_pexe bit to allow building this as a
17 # library dependency (much like the IRT). 22 # library dependency (much like the IRT).
18 nacl_gcc_env = env.Clone() 23 native_env = env.Clone()
19 nacl_gcc_env.ClearBits('pnacl_generate_pexe') 24 native_env.ClearBits('pnacl_generate_pexe')
20 nacl_gcc_env = nacl_gcc_env.PNaClGetNNaClEnv() 25 if env.Bit('target_arm'):
26 native_env.PNaClForceNative()
27 else:
28 native_env = native_env.PNaClGetNNaClEnv()
21 29
22 pnacl_irt_shim = nacl_gcc_env.ComponentLibrary('pnacl_irt_shim', [ 30 pnacl_irt_shim = native_env.ComponentLibrary('pnacl_irt_shim', [
23 'pnacl_shim.c', 31 'pnacl_shim.c',
24 'shim_entry.c', 32 'shim_entry.c',
25 'shim_ppapi.c', 33 'shim_ppapi.c',
26 ]) 34 ])
27 35
28 # However, the library is part of the pnacl sdk (use original env). 36 # However, the library is part of the pnacl sdk (use original env).
29 env.AddLibraryToSdk(pnacl_irt_shim) 37 env.AddLibraryToSdk(pnacl_irt_shim)
30 38
31 env.AddObjectToSdk(['libpnacl_irt_shim.a']) 39 env.AddObjectToSdk(['libpnacl_irt_shim.a'])
OLDNEW
« no previous file with comments | « ppapi/generators/idl_gen_wrapper.py ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698