Lines Matching refs:config
18 def get_required_attr(config, attr_name): argument
19 attr_value = getattr(config, attr_name, None)
28 config.name = 'MemProfiler' + config.name_suffix
31 default_memprof_opts = list(config.default_sanitizer_opts)
35 config.environment['MEMPROF_OPTIONS'] = default_memprof_opts_str
36 config.substitutions.append(('%env_memprof_opts=',
40 config.test_source_root = os.path.dirname(__file__)
46 target_cflags = [get_required_attr(config, 'target_cflags')]
47 target_cxxflags = config.cxx_mode_flags + target_cflags
52 config.debug_info_flags + target_cflags)
53 clang_memprof_static_cxxflags = config.cxx_mode_flags + clang_memprof_static_cflags
56 if config.memprof_dynamic:
58 config.available_features.add('memprof-dynamic-runtime')
60 config.available_features.add('memprof-static-runtime')
65 return ' ' + ' '.join([config.clang] + compile_flags) + ' '
67 config.substitutions.append( ("%clang ", build_invocation(target_cflags)) )
68 config.substitutions.append( ("%clangxx ", build_invocation(target_cxxflags)) )
69 config.substitutions.append( ("%clang_memprof ", build_invocation(clang_memprof_cflags)) )
70 config.substitutions.append( ("%clangxx_memprof ", build_invocation(clang_memprof_cxxflags)) )
71 if config.memprof_dynamic:
72 …shared_libmemprof_path = os.path.join(config.compiler_rt_libdir, 'libclang_rt.memprof{}.so'.format…
73 config.substitutions.append( ("%shared_libmemprof", shared_libmemprof_path) )
74 …config.substitutions.append( ("%clang_memprof_static ", build_invocation(clang_memprof_static_cfla…
75 …config.substitutions.append( ("%clangxx_memprof_static ", build_invocation(clang_memprof_static_cx…
78 config.substitutions.append(("%stdcxx11 ", '-std=c++11 '))
80 config.substitutions.append( ("%libdl", libdl_flag) )
82 config.available_features.add('memprof-' + config.bits + '-bits')
84 config.available_features.add('fast-unwinder-works')
88 (config.compiler_rt_libdir, config.environment.get('LD_LIBRARY_PATH', '')))
89 config.environment['LD_LIBRARY_PATH'] = new_ld_library_path
92 config.suffixes = ['.c', '.cpp']
94 config.substitutions.append(('%fPIC', '-fPIC'))
95 config.substitutions.append(('%fPIE', '-fPIE'))
96 config.substitutions.append(('%pie', '-pie'))
99 if config.host_os not in ['Linux']:
100 config.unsupported = True
102 if not config.parallelism_group:
103 config.parallelism_group = 'shadow-memory'