aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-devtools/codexl/codexl/0015-add-build-control-flag-CXL_RA_only.patch
blob: 770d89cb6baa2a56c8515587ad56235a9b27f606 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From d353057bd4fa5123a24c721922c1420934e143c9 Mon Sep 17 00:00:00 2001
From: Adeel Arshad <adeel_arshad@mentor.com>
Date: Fri, 28 Oct 2016 16:59:22 +0500
Subject: [PATCH] add build control flag CXL_RA_only

CXL_RA_only flag allow to tweak the build to become
suitable for Remote Agent only build, as UI based
components will not be required for remote agent
only build. Currently just exclude the UI based components
from the framework when we are doing a remote
agent only build.

Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
---
 CodeXL/SConstruct            | 18 ++++++++++++------
 Common/Src/SCons/CXL_init.py |  7 +++++++
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/CodeXL/SConstruct b/CodeXL/SConstruct
index d469d98..9bbbcb5 100755
--- a/CodeXL/SConstruct
+++ b/CodeXL/SConstruct
@@ -151,7 +151,8 @@ FrameworkComponents = []
 BaseTools_Obj = SConscript('../Common/Src/AMDTBaseTools/SConscript', variant_dir=obj_variant_dir+'/AMDTBaseTools', duplicate=0)
 FrameworkComponents += BaseTools_Obj
 Assertion_Obj = SConscript('../Common/Src/AMDTAssertionHandlers/SConscript', variant_dir=obj_variant_dir+'/AMDTAssertionHandlers', duplicate=0)
-FrameworkComponents += Assertion_Obj
+if CXL_env['CXL_RA_only'] != 'true' :
+	FrameworkComponents += Assertion_Obj
 
 OSWrappers_Obj = SConscript('../Common/Src/AMDTOSWrappers/SConscript', variant_dir=obj_variant_dir+'/AMDTOSWrappers', duplicate=0)
 CXL_env.Depends(OSWrappers_Obj, BaseTools_Obj)
@@ -167,7 +168,8 @@ FrameworkComponents += APIClasses_Obj
 
 AppComponents_Obj = SConscript('../Common/Src/AMDTApplicationComponents/SConscript', variant_dir=obj_variant_dir+'/AMDTApplicationComponents', duplicate=0)
 CXL_env.Depends(AppComponents_Obj, APIClasses_Obj + OSWrappers_Obj + OSAPIWrappers_Obj + BaseTools_Obj)
-FrameworkComponents += AppComponents_Obj
+if CXL_env['CXL_RA_only'] != 'true' :
+	FrameworkComponents += AppComponents_Obj
 
 AMDTRemoteClient_Obj = SConscript('Remote/AMDTRemoteClient/SConscript', variant_dir=obj_variant_dir+'/AMDTRemoteClient', duplicate=0)
 CXL_env.Depends(AMDTRemoteClient_Obj, OSWrappers_Obj + BaseTools_Obj) 
@@ -175,21 +177,25 @@ FrameworkComponents += AMDTRemoteClient_Obj
 
 AppFramework_Obj = SConscript('AMDTApplicationFramework/SConscript', variant_dir=obj_variant_dir+'/AMDTApplicationFramework', duplicate=0)
 CXL_env.Depends(AppFramework_Obj, APIClasses_Obj + OSWrappers_Obj + OSAPIWrappers_Obj + BaseTools_Obj + AMDTRemoteClient_Obj)
-FrameworkComponents += AppFramework_Obj
+if CXL_env['CXL_RA_only'] != 'true' :
+	FrameworkComponents += AppFramework_Obj
 
 # This depends upon everything built to date
 Application_Obj = SConscript('../Common/Src/AMDTApplication/SConscript', variant_dir=obj_variant_dir+'/AMDTApplication', duplicate=0)
 CXL_env.Depends(Application_Obj, FrameworkComponents)
-FrameworkComponents += Application_Obj
+if CXL_env['CXL_RA_only'] != 'true' :
+	FrameworkComponents += Application_Obj
 
 # This depends upon everything built to date
 Application_Obj = SConscript('App/SConscript', variant_dir=obj_variant_dir+'/AMDCodeXL', duplicate=0)
 CXL_env.Depends(Application_Obj, FrameworkComponents)
-#FrameworkComponents += Application_Obj
+if CXL_env['CXL_RA_only'] != 'true' :
+	FrameworkComponents += Application_Obj
 
 SharedProf_Obj = SConscript('Components/AMDTSharedProfiling/SConscript', variant_dir=obj_variant_dir+'/AMDTSharedProfiling', duplicate=0)
 CXL_env.Depends(SharedProf_Obj, FrameworkComponents)
-FrameworkComponents += SharedProf_Obj
+if CXL_env['CXL_RA_only'] != 'true' :
+	FrameworkComponents += SharedProf_Obj
 
 CXL_env.Depends(FrameworkComponents, 
 	CXL_env['CXL_Images_install'] + 
diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
index d1ca678..a2443ac 100755
--- a/Common/Src/SCons/CXL_init.py
+++ b/Common/Src/SCons/CXL_init.py
@@ -100,6 +100,13 @@ def initCXLVars (CXL_vars) :
         help = 'Specify Boost directory to use',
         default = '',)
 
+    # CxL support for remote agent only build
+    CXL_vars.Add(
+        key = 'CXL_RA_only',
+        help = 'Support for Remote Agent only build, exclude all UI components',
+        default = '',
+        allowed_values = ('true', ''))
+
 def initJava (env) :
     useJava = os.getenv('JAVA_HOME', '')
     if (useJava != ''):
-- 
1.9.1