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

Unified 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: Another go at Windows x64, with help from Noel. 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/cpu_features/build.scons
diff --git a/src/trusted/cpu_features/build.scons b/src/trusted/cpu_features/build.scons
new file mode 100644
index 0000000000000000000000000000000000000000..ad6986917360607ac8987b33349a8316b45387cd
--- /dev/null
+++ b/src/trusted/cpu_features/build.scons
@@ -0,0 +1,34 @@
+# -*- python -*-
+# Copyright (c) 2013 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+Import('env')
+
+env.ComponentLibrary('cpu_features',
+ ['arch/arm/cpu_arm.c',
+ 'arch/mips/cpu_mips.c',
+ 'arch/x86/cpu_x86.c',
+ 'arch/x86/cpu_xgetbv.S'])
+
+if env.Bit('target_x86'):
+ # Create environment for command-line tools and testing, rather than
+ # part of the TCB. Then define compile-time flag that communicates
+ # that we are compiling in the test environment (rather than for the TCB).
+ test_env = env.Clone()
+ test_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB'])
+
+ cpu_x86_test = test_env.ComponentProgram(
+ 'cpu_x86_test',
+ ['arch/x86/cpu_x86_test.c'],
+ EXTRA_LIBS=[
+ test_env.NaClTargetArchSuffix('ncval_base'),
+ 'cpu_features',
+ 'platform'
+ ])
+
+ node = test_env.CommandTest(
+ 'cpu_x86_test.out',
+ [cpu_x86_test])
+ test_env.AddNodeToTestSuite(node, ['large_tests'], 'run_cpu_x86_test')

Powered by Google App Engine
This is Rietveld 408576698