From d353057bd4fa5123a24c721922c1420934e143c9 Mon Sep 17 00:00:00 2001 From: Adeel Arshad 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 --- 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