Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm".
authorDuncan Sands <baldrick@free.fr>
Thu, 25 Nov 2010 21:19:52 +0000 (21:19 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 25 Nov 2010 21:19:52 +0000 (21:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120156 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile
test/lib/llvm.exp
test/lit.cfg

index 87f21cfa5460ca5650b823383916a721fd93c5d9..06b997df906804f0ddbce2daef26b3a72c3a24bb 100644 (file)
@@ -162,6 +162,7 @@ site.exp: FORCE
        @echo 'set grep "$(GREP)"' >>site.tmp
        @echo 'set gas "$(GAS)"' >>site.tmp
        @echo 'set llvmdsymutil "$(DSYMUTIL)"' >>site.tmp
+       @echo 'set emitir "$(LLVMCC_EMITIR_FLAG)"' >>site.tmp
        @echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
        @test ! -f site.exp || \
        sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
index 19a27296044b8925c8393423e4f27b54a9551267..d92503a37337068d38eca899b3c88024f54b67ac 100644 (file)
@@ -47,7 +47,7 @@ proc execOneLine { test PRS outcome lineno line } {
 # cases.
 proc substitute { line test tmpFile } {
   global srcroot objroot srcdir objdir subdir target_triplet
-  global llvmgcc llvmgxx ocamlopt
+  global llvmgcc llvmgxx emitir ocamlopt
   global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
   global llvmdsymutil valgrind grep gas bugpoint_topts
   set path [file join $srcdir $subdir]
@@ -60,9 +60,9 @@ proc substitute { line test tmpFile } {
   #replace %llvmgcc_only with actual path to llvmgcc
   regsub -all {%llvmgcc_only} $new_line "$llvmgcc" new_line
   #replace %llvmgcc with actual path to llvmgcc
-  regsub -all {%llvmgcc} $new_line "$llvmgcc -emit-llvm -w" new_line
+  regsub -all {%llvmgcc} $new_line "$llvmgcc $emitir -w" new_line
   #replace %llvmgxx with actual path to llvmg++
-  regsub -all {%llvmgxx} $new_line "$llvmgxx -emit-llvm -w" new_line
+  regsub -all {%llvmgxx} $new_line "$llvmgxx $emitir -w" new_line
   #replace %compile_cxx with C++ compilation command
   regsub -all {%compile_cxx} $new_line "$compile_cxx" new_line
   #replace %compile_c with C compilation command
index 3ba4c993ef64a3100abe14612d788baa2bf4c981..b529169df001a42e5d7216829040580ce53fb326 100644 (file)
@@ -125,12 +125,12 @@ for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
 
 # Add substitutions.
 config.substitutions.append(('%llvmgcc_only', site_exp['llvmgcc']))
-for sub in ['llvmgcc', 'llvmgxx', 'compile_cxx', 'compile_c',
+for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
             'link', 'shlibext', 'ocamlopt', 'llvmdsymutil', 'llvmlibsdir',
             'bugpoint_topts']:
     if sub in ('llvmgcc', 'llvmgxx'):
         config.substitutions.append(('%' + sub,
-                                     site_exp[sub] + ' -emit-llvm -w'))
+                                     site_exp[sub] + ' %emitir -w'))
     # FIXME: This is a hack to avoid LLVMC tests failing due to a clang driver
     #        warning when passing in "-fexceptions -fno-exceptions".
     elif sub == 'compile_cxx':