summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-22 21:52:35 +0000
committerAlp Toker <alp@nuanti.com>2014-01-22 21:52:35 +0000
commita11863820c554db3e031a113a1503c6d49ca7134 (patch)
tree731454668942d7c5a372a2de70402353c9dcd483
parentbc909618f290ff8b0976620a3738558e9d2842e6 (diff)
downloadbcm5719-llvm-a11863820c554db3e031a113a1503c6d49ca7134.tar.gz
bcm5719-llvm-a11863820c554db3e031a113a1503c6d49ca7134.zip
Eliminate inappropriate use of FindProgramByName() from lli
llvm-svn: 199835
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll2
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll2
-rw-r--r--llvm/test/Makefile1
-rw-r--r--llvm/test/lit.cfg1
-rw-r--r--llvm/test/lit.site.cfg.in1
-rw-r--r--llvm/tools/lli/lli.cpp20
15 files changed, 23 insertions, 22 deletions
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll b/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
index 094d362262c..8331ecf93c2 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; RUN: %lli_mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
declare i32 @FB()
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll b/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll
index bdaa9a045c8..589ba2f6d38 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target -relocation-model=pic -code-model=small %s > /dev/null
+; RUN: %lli_mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext -relocation-model=pic -code-model=small %s > /dev/null
; XFAIL: mips, i686, i386, arm
declare i32 @FB()
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll b/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
index 91d0387376c..d04df322cb3 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; RUN: %lli_mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
declare i32 @FB()
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll b/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll
index 73228e458f0..9c231695991 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target -relocation-model=pic -code-model=small %s > /dev/null
+; RUN: %lli_mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext -relocation-model=pic -code-model=small %s > /dev/null
; XFAIL: mips, i686, i386, arm
declare i32 @FB()
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
index d10a4117a0d..ddee861346d 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
define i32 @bar() {
ret i32 0
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
index 97932bc389a..48b939bbe35 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target %s
+; RUN: %lli_mcjit -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: *
; This test should fail until remote symbol resolution is supported.
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
index 63280895a9a..e07178ed283 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target %s
+; RUN: %lli_mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
; The intention of this test is to verify that symbols mapped to COMMON in ELF
; work as expected.
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
index 6b2b97bc2d7..0c895984231 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target %s
+; RUN: %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
; Check that a variable is always aligned as specified.
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
index a8a93a8dc3b..5ad71112ae8 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
define double @test(double* %DP, double %Arg) {
%D = load double* %DP ; <double> [#uses=1]
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
index 4181fb08842..b14d80b156a 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
@count = global i32 1, align 4
diff --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
index 8b562972b5d..d62631ff50c 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
@@ -1,4 +1,4 @@
-; RUN: %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target %s
+; RUN: %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
diff --git a/llvm/test/Makefile b/llvm/test/Makefile
index d3227dd5a34..e90370779c9 100644
--- a/llvm/test/Makefile
+++ b/llvm/test/Makefile
@@ -125,6 +125,7 @@ lit.site.cfg: FORCE
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> lit.tmp
@$(ECHOPATH) s=@SHLIBEXT@=$(SHLIBEXT)=g >> lit.tmp
+ @$(ECHOPATH) s=@EXEEXT@=$(EXEEXT)=g >> lit.tmp
@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=$(PYTHON)=g >> lit.tmp
@$(ECHOPATH) s=@OCAMLOPT@=$(OCAMLOPT) -cc $(subst *,'\\\"',*$(subst =,"\\=",$(CXX_FOR_OCAMLOPT))*) -cclib -L$(LibDir) -I $(LibDir)/ocaml=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg
index 251dbe0966c..622f6ede1a1 100644
--- a/llvm/test/lit.cfg
+++ b/llvm/test/lit.cfg
@@ -188,6 +188,7 @@ else:
config.substitutions.append( ('%ocamlopt', config.ocamlopt_executable) )
config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
+config.substitutions.append( ('%exeext', config.llvm_exe_ext) )
# For each occurrence of an llvm tool name as its own word, replace it
# with the full path to the build directory holding that tool. This
diff --git a/llvm/test/lit.site.cfg.in b/llvm/test/lit.site.cfg.in
index b9520f908a5..4c0bb2e47d3 100644
--- a/llvm/test/lit.site.cfg.in
+++ b/llvm/test/lit.site.cfg.in
@@ -9,6 +9,7 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvm_shlib_dir = "@SHLIBDIR@"
config.llvm_shlib_ext = "@SHLIBEXT@"
+config.llvm_exe_ext = "@EXEEXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.python_executable = "@PYTHON_EXECUTABLE@"
config.ocamlopt_executable = "@OCAMLOPT@"
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 2ee79793012..e6d4087476f 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -94,12 +94,11 @@ namespace {
// execution. The child process will be executed and will communicate with
// lli via stdin/stdout pipes.
cl::opt<std::string>
- MCJITRemoteProcess("mcjit-remote-process",
- cl::desc("Specify the filename of the process to launch "
- "for remote MCJIT execution. If none is specified,"
- "\n\tremote execution will be simulated in-process."),
- cl::value_desc("filename"),
- cl::init(""));
+ ChildExecPath("mcjit-remote-process",
+ cl::desc("Specify the filename of the process to launch "
+ "for remote MCJIT execution. If none is specified,"
+ "\n\tremote execution will be simulated in-process."),
+ cl::value_desc("filename"), cl::init(""));
// Determine optimization level.
cl::opt<char>
@@ -663,18 +662,17 @@ int main(int argc, char **argv, char * const *envp) {
// and send it to the target.
OwningPtr<RemoteTarget> Target;
- if (!MCJITRemoteProcess.empty()) { // Remote execution on a child process
+ if (!ChildExecPath.empty()) { // Remote execution on a child process
if (!RemoteTarget::hostSupportsExternalRemoteTarget()) {
errs() << "Warning: host does not support external remote targets.\n"
<< " Defaulting to simulated remote execution\n";
Target.reset(RemoteTarget::createRemoteTarget());
} else {
- std::string ChildEXE = sys::FindProgramByName(MCJITRemoteProcess);
- if (ChildEXE == "") {
- errs() << "Unable to find child target: '\''" << MCJITRemoteProcess << "\'\n";
+ if (!sys::fs::exists(ChildExecPath)) {
+ errs() << "Unable to find child target: '" << ChildExecPath << "'\n";
return -1;
}
- Target.reset(RemoteTarget::createExternalRemoteTarget(ChildEXE));
+ Target.reset(RemoteTarget::createExternalRemoteTarget(ChildExecPath));
}
} else {
// No child process name provided, use simulated remote execution.
OpenPOWER on IntegriCloud