Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
libcxx/utils/libcxx/test/config.py
Show First 20 Lines • Show All 449 Lines • ▼ Show 20 Lines | class Configuration(object): | ||||
def configure_substitutions(self): | def configure_substitutions(self): | ||||
sub = self.config.substitutions | sub = self.config.substitutions | ||||
sub.append(('%{cxx}', self.quote(self.cxx.path))) | sub.append(('%{cxx}', self.quote(self.cxx.path))) | ||||
flags = self.cxx.flags + (self.cxx.modules_flags if self.cxx.use_modules else []) | flags = self.cxx.flags + (self.cxx.modules_flags if self.cxx.use_modules else []) | ||||
compile_flags = self.cxx.compile_flags + (self.cxx.warning_flags if self.cxx.use_warnings else []) | compile_flags = self.cxx.compile_flags + (self.cxx.warning_flags if self.cxx.use_warnings else []) | ||||
sub.append(('%{flags}', ' '.join(map(self.quote, flags)))) | sub.append(('%{flags}', ' '.join(map(self.quote, flags)))) | ||||
sub.append(('%{compile_flags}', ' '.join(map(self.quote, compile_flags)))) | sub.append(('%{compile_flags}', ' '.join(map(self.quote, compile_flags)))) | ||||
sub.append(('%{link_flags}', ' '.join(map(self.quote, self.cxx.link_flags)))) | sub.append(('%{link_flags}', ' '.join(map(self.quote, self.cxx.link_flags)))) | ||||
sub.append(('%{install}', self.quote(self.config.install_root))) | |||||
codesign_ident = self.get_lit_conf('llvm_codesign_identity', '') | codesign_ident = self.get_lit_conf('llvm_codesign_identity', '') | ||||
env_vars = ' '.join('%s=%s' % (k, self.quote(v)) for (k, v) in self.exec_env.items()) | env_vars = ' '.join('%s=%s' % (k, self.quote(v)) for (k, v) in self.exec_env.items()) | ||||
exec_args = [ | exec_args = [ | ||||
'--execdir %T', | '--execdir %T', | ||||
'--codesign_identity "{}"'.format(codesign_ident), | '--codesign_identity "{}"'.format(codesign_ident), | ||||
'--env {}'.format(env_vars) | '--env {}'.format(env_vars) | ||||
] | ] | ||||
sub.append(('%{exec}', '{} {} -- '.format(self.executor, ' '.join(exec_args)))) | sub.append(('%{exec}', '{} {} -- '.format(self.executor, ' '.join(exec_args)))) | ||||
def configure_env(self): | def configure_env(self): | ||||
self.config.environment = dict(os.environ) | self.config.environment = dict(os.environ) | ||||
def add_path(self, dest_env, new_path): | def add_path(self, dest_env, new_path): | ||||
self.target_info.add_path(dest_env, new_path) | self.target_info.add_path(dest_env, new_path) |