# we don't support COFF in MCJIT well enough for the tests, force ELF format on
# Windows. FIXME: the process target triple should be used here, but this is
# difficult to obtain on Windows.
# we don't support COFF in MCJIT well enough for the tests, force ELF format on
# Windows. FIXME: the process target triple should be used here, but this is
# difficult to obtain on Windows.
lli += ' -mtriple='+config.host_triple+'-elf'
config.substitutions.append( ('%lli', lli ) )
lli += ' -mtriple='+config.host_triple+'-elf'
config.substitutions.append( ('%lli', lli ) )
config.substitutions.append( ('%llc_dwarf', llc_dwarf) )
# Add site-specific substitutions.
config.substitutions.append( ('%llc_dwarf', llc_dwarf) )
# Add site-specific substitutions.
config.substitutions.append( ('%go', config.go_executable) )
config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
config.substitutions.append( ('%go', config.go_executable) )
config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
# Warn, but still provide a substitution.
lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir)
tool_path = llvm_tools_dir + '/' + tool_name
# Warn, but still provide a substitution.
lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir)
tool_path = llvm_tools_dir + '/' + tool_name
- ld_cmd = subprocess.Popen(['ld', '--help'], stdout = subprocess.PIPE)
- ld_out = ld_cmd.stdout.read()
+ ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE)
+ ld_out = ld_cmd.stdout.read().decode()
- ld_version = subprocess.Popen(['ld', '--version'], stdout = subprocess.PIPE)
- if not 'GNU gold' in ld_version.stdout.read():
+ ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE)
+ if not 'GNU gold' in ld_version.stdout.read().decode():