[llvm] r246421 - Force the locale when executing ld gold

Sylvestre Ledru via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 00:10:05 PDT 2015


Author: sylvestre
Date: Mon Aug 31 02:10:05 2015
New Revision: 246421

URL: http://llvm.org/viewvc/llvm-project?rev=246421&view=rev
Log:
Force the locale when executing ld gold

Summary:
If run with other locales (like French),
the decode operation might fail

Reviewers: rafael

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

Modified:
    llvm/trunk/test/lit.cfg

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=246421&r1=246420&r2=246421&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Mon Aug 31 02:10:05 2015
@@ -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()
 
@@ -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()




More information about the llvm-commits mailing list