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

Side by Side Diff: src/trusted/cpu_features/build.scons

Issue 11864002: Move CPU features into its own static library. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Address bsy's comments by not building x86 target when host isn't x86. This is how things are curre… Created 7 years, 11 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
« no previous file with comments | « src/trusted/cpu_features/arch/x86/cpu_xgetbv.S ('k') | src/trusted/cpu_features/cpu_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # -*- python -*-
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7 Import('env')
8
9 sources = ['arch/arm/cpu_arm.c',
10 'arch/mips/cpu_mips.c']
11
12 # TODO(jfb) Temporary hack while the x86 CPU features aren't factored
13 # out between host and target API functions. The eventual goal is for
14 # inline asm to be in host-specific code and only built for that host,
15 # and generic CPU feature emulation and querying to be built for all
16 # hosts. ARM and MIPS don't ahve these problems as of today because they
17 # don't actually query their CPU.
18 # Do the same in the gyp build.
19 if env.Bit('target_x86'):
20 sources += ['arch/x86/cpu_x86.c',
21 'arch/x86/cpu_xgetbv.S']
22
23 env.ComponentLibrary('cpu_features', sources)
24
25 # TODO(jfb) Also test ARM and MIPS.
26 if env.Bit('target_x86'):
27 # Create environment for command-line tools and testing, rather than
28 # part of the TCB. Then define compile-time flag that communicates
29 # that we are compiling in the test environment (rather than for the TCB).
30 test_env = env.Clone()
31 test_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB'])
32
33 cpu_x86_test = test_env.ComponentProgram(
34 'cpu_x86_test',
35 ['arch/x86/cpu_x86_test.c'],
36 EXTRA_LIBS=[
37 test_env.NaClTargetArchSuffix('ncval_base'),
38 'cpu_features',
39 'platform'
40 ])
41
42 node = test_env.CommandTest(
43 'cpu_x86_test.out',
44 [cpu_x86_test])
45 test_env.AddNodeToTestSuite(node, ['large_tests'], 'run_cpu_x86_test')
OLDNEW
« no previous file with comments | « src/trusted/cpu_features/arch/x86/cpu_xgetbv.S ('k') | src/trusted/cpu_features/cpu_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698