Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm".

llvm-svn: 120156
This commit is contained in:
Duncan Sands 2010-11-25 21:19:52 +00:00
parent 1bc5303aed
commit c78fbf9877
3 changed files with 6 additions and 5 deletions

View 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

View 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

View 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':