llvm.org GIT mirror llvm / dd4667f
tests: Rip out a bunch of now unused test code relating to use of llvm-gcc in LLVM tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143143 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 7 years ago
7 changed file(s) with 5 addition(s) and 99 deletion(s). Raw diff Collapse all Expand all
797797 you need multiple temporaries. This is useful as the destination of some
798798 redirected output.
799799
800
llvmlibsdir (%llvmlibsdir)
801
The directory where the LLVM libraries are located.
802
803800
target_triplet (%target_triplet)
804801
The target triplet that corresponds to the current host machine (the one
805802 running the test cases). This should probably be called "host".
806
807
llvmgcc (%llvmgcc)
808
The full path to the llvm-gcc executable as specified in the
809 configured LLVM environment
810
811
llvmgxx (%llvmgxx)
812
The full path to the llvm-gxx executable as specified in the
813 configured LLVM environment
814
815
gccpath
816
The full path to the C compiler used to build LLVM. Note that
817 this might not be gcc.
818
819
gxxpath
820
The full path to the C++ compiler used to build LLVM. Note that
821 this might not be g++.
822
823
compile_c (%compile_c)
824
The full command line used to compile LLVM C source code. This has all
825 the configured -I, -D and optimization options.
826
827
compile_cxx (%compile_cxx)
828
The full command used to compile LLVM C++ source code. This has
829 all the configured -I, -D and optimization options.
830803
831804
link (%link)
832805
This full link command used to link LLVM executables. This has all the
139139 @echo '# Do not edit!' >> site.tmp
140140 @echo 'set target_triplet "$(TARGET_TRIPLE)"' >> site.tmp
141141 @echo 'set TARGETS_TO_BUILD "$(TARGETS_TO_BUILD)"' >> site.tmp
142 @echo 'set llvmgcc_langs "$(LLVMGCC_LANGS)"' >> site.tmp
143 @echo 'set llvmtoolsdir "$(ToolDir)"' >>site.tmp
144 @echo 'set llvmlibsdir "$(LibDir)"' >>site.tmp
145142 @echo 'set llvmshlibdir "$(SharedLibDir)"' >>site.tmp
146143 @echo 'set llvm_bindings "$(BINDINGS_TO_BUILD)"' >> site.tmp
147144 @echo 'set srcroot "$(LLVM_SRC_ROOT)"' >>site.tmp
148145 @echo 'set objroot "$(LLVM_OBJ_ROOT)"' >>site.tmp
149146 @echo 'set srcdir "$(LLVM_SRC_ROOT)/test"' >>site.tmp
150147 @echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
151 @echo 'set gccpath "$(CC)"' >>site.tmp
152 @echo 'set gxxpath "$(CXX)"' >>site.tmp
153 @echo 'set compile_c "' $(CC) $(CPP.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >>site.tmp
154 @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c -x c++ '"' >> site.tmp
155148 @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
156 @echo 'set llvmgcc "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
157 @echo 'set llvmgxx "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
158 @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp
159149 @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp
160150 @echo 'set ocamlopt "$(OCAMLOPT) -cc \"$(CXX_FOR_OCAMLOPT)\" -I $(LibDir)/ocaml"' >> site.tmp
161151 @echo 'set valgrind "$(VALGRIND)"' >> site.tmp
162152 @echo 'set grep "$(GREP)"' >>site.tmp
163153 @echo 'set gas "$(GAS)"' >>site.tmp
164 @echo 'set llvmdsymutil "$(DSYMUTIL)"' >>site.tmp
165 @echo 'set emitir "$(LLVMCC_EMITIR_FLAG)"' >>site.tmp
166154 @echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
167155 @test ! -f site.exp || \
168156 sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
22 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
33 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
44 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
5 config.llvmgcc_dir = "@LLVMGCCDIR@"
65 config.llvm_build_mode = "@LLVM_BUILD_MODE@"
76 config.enable_shared = @ENABLE_SHARED@
87 config.shlibdir = "@SHLIBDIR@"
4646 # cases.
4747 proc substitute { line test tmpFile } {
4848 global srcroot objroot srcdir objdir subdir target_triplet
49 global llvmgcc llvmgxx emitir ocamlopt
50 global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
51 global llvmdsymutil valgrind grep gas bugpoint_topts
49 global ocamlopt
50 global link shlibext
51 global valgrind grep gas
5252 set path [file join $srcdir $subdir]
5353
5454 # Substitute all Tcl variables.
5656
5757 #replace %% with _#MARKER#_ to make the replacement of %% more predictable
5858 regsub -all {%%} $new_line {_#MARKER#_} new_line
59 #replace %llvmgcc_only with actual path to llvmgcc
60 regsub -all {%llvmgcc_only} $new_line "$llvmgcc" new_line
61 #replace %llvmgcc with actual path to llvmgcc
62 regsub -all {%llvmgcc} $new_line "$llvmgcc $emitir -w" new_line
63 #replace %llvmgxx with actual path to llvmg++
64 regsub -all {%llvmgxx} $new_line "$llvmgxx $emitir -w" new_line
65 #replace %compile_cxx with C++ compilation command
66 regsub -all {%compile_cxx} $new_line "$compile_cxx" new_line
67 #replace %compile_c with C compilation command
68 regsub -all {%compile_c} $new_line "$compile_c" new_line
6959 #replace %link with C++ link command
7060 regsub -all {%link} $new_line "$link" new_line
7161 #replace %shlibext with shared library extension
7262 regsub -all {%shlibext} $new_line "$shlibext" new_line
7363 #replace %ocamlopt with ocaml compiler command
7464 regsub -all {%ocamlopt} $new_line "$ocamlopt" new_line
75 #replace %llvmdsymutil with dsymutil command
76 regsub -all {%llvmdsymutil} $new_line "$llvmdsymutil" new_line
77 #replace %llvmlibsdir with configure library directory
78 regsub -all {%llvmlibsdir} $new_line "$llvmlibsdir" new_line
79 #replace %bugpoint_topts with actual bugpoint target options
80 regsub -all {%bugpoint_topts} $new_line "$bugpoint_topts" new_line
8165 #replace %p with path to source,
8266 regsub -all {%p} $new_line [file join $srcdir $subdir] new_line
8367 #replace %s with filename
4141 # Tweak the PATH to include the scripts dir, the tools dir, and the llvm-gcc bin
4242 # dir (if available).
4343 if llvm_obj_root is not None:
44 # Include llvm-gcc first, as the llvm-gcc binaryies will not appear
45 # neither in the tools nor in the scripts dir. However it might be
46 # possible, that some old llvm tools are in the llvm-gcc dir. Adding
47 # llvm-gcc dir first ensures, that those will always be overwritten
48 # by the new tools in llvm_tools_dir. So now outdated tools are used
49 # for testing
50 llvmgcc_dir = getattr(config, 'llvmgcc_dir', None)
51 if llvmgcc_dir:
52 path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'),
53 config.environment['PATH']))
54 config.environment['PATH'] = path
55
5644 llvm_src_root = getattr(config, 'llvm_src_root', None)
5745 if not llvm_src_root:
5846 lit.fatal('No LLVM source root set!')
153141 site_exp[m.group(1)] = m.group(2)
154142
155143 # Add substitutions.
156 config.substitutions.append(('%llvmgcc_only', site_exp['llvmgcc']))
157 for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
158 'link', 'shlibext', 'ocamlopt', 'llvmdsymutil', 'llvmlibsdir',
159 'llvmshlibdir',
160 'bugpoint_topts']:
161 if sub in ('llvmgcc', 'llvmgxx'):
162 config.substitutions.append(('%' + sub,
163 site_exp[sub] + ' %emitir -w'))
164 # FIXME: This is a hack to avoid LLVMC tests failing due to a clang driver
165 # warning when passing in "-fexceptions -fno-exceptions".
166 elif sub == 'compile_cxx':
167 config.substitutions.append(('%' + sub,
168 site_exp[sub].replace('-fno-exceptions', '')))
169 else:
170 config.substitutions.append(('%' + sub, site_exp[sub]))
144 for sub in ['link', 'shlibext', 'ocamlopt', 'llvmshlibdir']:
145 config.substitutions.append(('%' + sub, site_exp[sub]))
171146
172147 # For each occurrence of an llvm tool name as its own word, replace it
173148 # with the full path to the build directory holding that tool. This
22 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
33 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
44 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
5 config.llvmgcc_dir = "@LLVMGCCDIR@"
65 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
76 config.python_executable = "@PYTHON_EXECUTABLE@"
87 config.enable_shared = @ENABLE_SHARED@
11 # Do not edit!
22 set target_triplet "@TARGET_TRIPLE@"
33 set TARGETS_TO_BUILD "@TARGETS_TO_BUILD@"
4 set llvmgcc_langs "@LLVMGCC_LANGS@"
5 set llvmtoolsdir "@LLVM_TOOLS_DIR@"
6 set llvmlibsdir "@LLVM_LIBS_DIR@"
74 set llvmshlibdir "@SHLIBDIR@"
85 set llvm_bindings "@LLVM_BINDINGS@"
96 set srcroot "@LLVM_SOURCE_DIR@"
107 set objroot "@LLVM_BINARY_DIR@"
118 set srcdir "@LLVM_SOURCE_DIR@"
129 set objdir "@LLVM_BINARY_DIR@"
13 set gccpath "@GCCPATH@"
14 set gxxpath "@GXXPATH@"
15 set compile_c "@TEST_COMPILE_C_CMD@"
16 set compile_cxx "@TEST_COMPILE_CXX_CMD@"
1710 set link "@TEST_LINK_CMD@"
18 set llvmgcc "@LLVMGCC@"
19 set llvmgxx "@LLVMGXX@"
20 set bugpoint_topts "@BUGPOINT_TOPTS@"
2111 set shlibext "@SHLIBEXT@"
2212 set ocamlopt "@OCAMLOPT@"
2313 set valgrind "@VALGRIND@"
2414 set grep "@GREP@"
2515 set gas "@AS@"
26 set llvmdsymutil "@DSYMUTIL@"
27 set emitir "@LLVMCC_EMITIR_FLAG@"