Skip to content

Commit

Permalink
Force the locale when executing ld gold
Browse files Browse the repository at this point in the history
Summary:
If run with other locales (like French),
the decode operation might fail

Reviewers: rafael

Differential Revision: http://reviews.llvm.org/D12432

llvm-svn: 246421
  • Loading branch information
sylvestre committed Aug 31, 2015
1 parent 58758ef commit 3675d1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def have_ld_plugin_support():
if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')):
return False

ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE)
ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE, env={'LANG': 'C'})
ld_out = ld_cmd.stdout.read().decode()
ld_cmd.wait()

Expand All @@ -374,7 +374,7 @@ def have_ld_plugin_support():
if 'elf32ppc' in emulations:
config.available_features.add('ld_emu_elf32ppc')

ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE)
ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE, env={'LANG': 'C'})
if not 'GNU gold' in ld_version.stdout.read().decode():
return False
ld_version.wait()
Expand Down

0 comments on commit 3675d1a

Please sign in to comment.