def __init__(self, options, build_dir, gcc_version, python_inc, cuda_inc, build_environment, svn_roots): """Init method. """ self.rules_buf = [] self.options = options self.build_dir = build_dir self.gcc_version = gcc_version self.python_inc = python_inc self.cuda_inc = cuda_inc self.build_environment = build_environment self.ccflags_manager = CcFlagsManager(options) self.env_list = ['env_with_error', 'env_no_warning'] self.svn_roots = svn_roots self.svn_info_map = {} self.version_cpp_compile_template = string.Template(""" env_version = Environment(ENV = os.environ) env_version.Append(SHCXXCOMSTR = '%s$updateinfo%s' % (colors('cyan'), colors('end'))) env_version.Append(CPPFLAGS = '-m$m') version_obj = env_version.SharedObject('$filename') """) self.blade_config = configparse.blade_config self.distcc_enabled = self.blade_config.get_config( 'distcc_config').get('enabled', False) self.dccc_enabled = self.blade_config.get_config('link_config').get( 'enable_dccc', False)
def __init__(self, options, build_dir, gcc_version, python_inc, build_environment): """Init method. """ self.rules_buf = [] self.options = options self.build_dir = build_dir self.gcc_version = gcc_version self.python_inc = python_inc self.build_environment = build_environment self.ccflags_manager = CcFlagsManager(options) self.env_list = ['env_with_error', 'env_no_warning']
def __init__(self, options, build_dir, gcc_version, python_inc, cuda_inc, build_environment, svn_roots): self.rules_buf = [] self.options = options self.build_dir = build_dir self.gcc_version = gcc_version self.python_inc = python_inc self.cuda_inc = cuda_inc self.build_environment = build_environment self.ccflags_manager = CcFlagsManager(options, build_dir, gcc_version) self.svn_roots = svn_roots self.distcc_enabled = config.get_item('distcc_config', 'enabled')
def __init__(self, options, build_dir, gcc_version, python_inc, cuda_inc, build_environment, svn_roots): self.rules_buf = [] self.options = options self.build_dir = build_dir self.gcc_version = gcc_version self.python_inc = python_inc self.cuda_inc = cuda_inc self.build_environment = build_environment self.ccflags_manager = CcFlagsManager(options, build_dir, gcc_version) self.svn_roots = svn_roots self.blade_config = configparse.blade_config self.distcc_enabled = self.blade_config.get_config( 'distcc_config').get('enabled', False) self.dccc_enabled = self.blade_config.get_config('link_config').get( 'enable_dccc', False)
def __init__(self, command_targets, blade_path, working_dir, build_path, current_source_path, blade_options, **kwargs): """init method. Mainly to hold the global data. The directory which changes during the runtime of blade, and contains BUILD file under current focus. current_source_dir = "." Given some targets specified in the command line, Blade will load BUILD files containing these command line targets; global target functions, i.e., cc_libarary, cc_binary and etc, in these BUILD files will register targets into target_database, which then becomes the input to dependency analyzer and SCons rules generator. It is notable that not all targets in target_database are dependencies of command line targets. target_database = {} related targets after loading the build files and exec BUILD files as python script related_targets = {} The map used by build rules to ensure that a source file occurres in exactly one rule/target(only library target). target_srcs_map = {} The scons cache manager class string, which should be output to scons script if ccache is not installed scache_manager_class_str = '' The targets keys list after sorting by topological sorting method. sorted_targets_keys = [] Inidcating that whether the deps list is expanded by expander or not False - not expanded True - expanded target_deps_expanded All targets after expanding their dependency all_targets = {} The scons target objects registered into blade manager scons_targets_map = {} The vars which are depended by python binary {key : 'python_files'} self.python_binary_dep_source_cmd = {} The files which are depended by python binary {key : 'python_files'} python_binary_dep_source_map = {} The files which are depended by java jar file {key : 'java_files'} java_jar_dep_source_map = {} The files which should be packed into java jar {key : 'packing_files'} java_jar_files_packing_map = {} The jar files map {key : 'jar_files_generated'} java_jars_map = {} The java compiling classpath parameter map java_classpath_map = {} {key : 'target_path'} The java_jar dep var map, which should be added to dependency chain java_jar_dep_vars = {} The cc objects pool, a map to hold all the objects name. cc_objects_pool = {} The gen rule files map, which is used to generate the explict dependency relationtion ship between gen_rule target and other targets gen_rule_files_map = {} The direct targets that are used for analyzing direct_targets = [] All command targets, make sure that all targets specified with ... are all in the list now all_command_targets = [] The class to get platform info SconsPlatform The class to manage the cc flags CcFlagsManager The sources files that are needed to perform explict dependency sources_explict_dependency_map = {} The prebuilt cc_library file map which is needed to establish symbolic links while testing prebuilt_cc_library_file_map = {} """ self.command_targets = command_targets self.direct_targets = [] self.all_command_targets = [] self.blade_path = blade_path self.working_dir = working_dir self.build_path = build_path self.current_source_path = current_source_path self.target_database = {} self.related_targets = {} self.target_srcs_map = {} self.scache_manager_class_str = '' self.options = blade_options self.sorted_targets_keys = [] self.target_deps_expanded = False self.all_targets_expanded = {} self.scons_targets_map = {} self.java_jar_dep_source_map = {} self.java_jar_files_packing_map = {} self.java_jars_map = {} self.java_classpath_map = {} self.java_jar_dep_vars = {} self.python_binary_dep_source_cmd = {} self.python_binary_dep_source_map = {} self.cc_objects_pool = {} self.deps_expander = None self.build_rules_generator = None self.gen_rule_files_map = {} self.scons_platform = SconsPlatform() self.ccflags_manager = CcFlagsManager(self.options) self.sources_explict_dependency_map = {} self.prebuilt_cc_library_file_map = {} self.distcc_enabled = configparse.blade_config.get_config( 'distcc_config')['enabled'] self.build_environment = BuildEnvironment(self.current_source_path) self.svn_root_dirs = [] self.kwargs = kwargs