From 48f296dada9a344f278bf3a4b3f5bfb97b0935c2 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Thu, 25 Nov 2010 21:19:52 +0000 Subject: [PATCH] Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120156 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Makefile | 1 + test/lib/llvm.exp | 6 +++--- test/lit.cfg | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/Makefile b/test/Makefile index 87f21cfa546..06b997df906 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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 diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp index 19a27296044..d92503a3733 100644 --- a/test/lib/llvm.exp +++ b/test/lib/llvm.exp @@ -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 diff --git a/test/lit.cfg b/test/lit.cfg index 3ba4c993ef6..b529169df00 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -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': -- 2.34.1