mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Eliminate inappropriate use of FindProgramByName() from lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4bcb85658d
commit
1214e71d77
@ -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()
|
declare i32 @FB()
|
||||||
|
|
||||||
|
@ -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
|
; XFAIL: mips, i686, i386, arm
|
||||||
|
|
||||||
declare i32 @FB()
|
declare i32 @FB()
|
||||||
|
@ -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()
|
declare i32 @FB()
|
||||||
|
|
||||||
|
@ -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
|
; XFAIL: mips, i686, i386, arm
|
||||||
|
|
||||||
declare i32 @FB()
|
declare i32 @FB()
|
||||||
|
@ -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() {
|
define i32 @bar() {
|
||||||
ret i32 0
|
ret i32 0
|
||||||
|
@ -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: *
|
; XFAIL: *
|
||||||
; This test should fail until remote symbol resolution is supported.
|
; This test should fail until remote symbol resolution is supported.
|
||||||
|
|
||||||
|
@ -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
|
; The intention of this test is to verify that symbols mapped to COMMON in ELF
|
||||||
; work as expected.
|
; work as expected.
|
||||||
|
@ -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.
|
; Check that a variable is always aligned as specified.
|
||||||
|
|
||||||
|
@ -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) {
|
define double @test(double* %DP, double %Arg) {
|
||||||
%D = load double* %DP ; <double> [#uses=1]
|
%D = load double* %DP ; <double> [#uses=1]
|
||||||
|
@ -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
|
@count = global i32 1, align 4
|
||||||
|
|
||||||
|
@ -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
|
@.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
|
@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
|
||||||
|
@ -125,6 +125,7 @@ lit.site.cfg: FORCE
|
|||||||
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
|
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
|
||||||
@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> lit.tmp
|
@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> lit.tmp
|
||||||
@$(ECHOPATH) s=@SHLIBEXT@=$(SHLIBEXT)=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=@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=@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
|
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
|
||||||
|
@ -188,6 +188,7 @@ else:
|
|||||||
config.substitutions.append( ('%ocamlopt', config.ocamlopt_executable) )
|
config.substitutions.append( ('%ocamlopt', config.ocamlopt_executable) )
|
||||||
config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
|
config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
|
||||||
config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
|
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
|
# 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
|
# with the full path to the build directory holding that tool. This
|
||||||
|
@ -9,6 +9,7 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|||||||
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
||||||
config.llvm_shlib_dir = "@SHLIBDIR@"
|
config.llvm_shlib_dir = "@SHLIBDIR@"
|
||||||
config.llvm_shlib_ext = "@SHLIBEXT@"
|
config.llvm_shlib_ext = "@SHLIBEXT@"
|
||||||
|
config.llvm_exe_ext = "@EXEEXT@"
|
||||||
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
||||||
config.python_executable = "@PYTHON_EXECUTABLE@"
|
config.python_executable = "@PYTHON_EXECUTABLE@"
|
||||||
config.ocamlopt_executable = "@OCAMLOPT@"
|
config.ocamlopt_executable = "@OCAMLOPT@"
|
||||||
|
@ -94,12 +94,11 @@ namespace {
|
|||||||
// execution. The child process will be executed and will communicate with
|
// execution. The child process will be executed and will communicate with
|
||||||
// lli via stdin/stdout pipes.
|
// lli via stdin/stdout pipes.
|
||||||
cl::opt<std::string>
|
cl::opt<std::string>
|
||||||
MCJITRemoteProcess("mcjit-remote-process",
|
ChildExecPath("mcjit-remote-process",
|
||||||
cl::desc("Specify the filename of the process to launch "
|
cl::desc("Specify the filename of the process to launch "
|
||||||
"for remote MCJIT execution. If none is specified,"
|
"for remote MCJIT execution. If none is specified,"
|
||||||
"\n\tremote execution will be simulated in-process."),
|
"\n\tremote execution will be simulated in-process."),
|
||||||
cl::value_desc("filename"),
|
cl::value_desc("filename"), cl::init(""));
|
||||||
cl::init(""));
|
|
||||||
|
|
||||||
// Determine optimization level.
|
// Determine optimization level.
|
||||||
cl::opt<char>
|
cl::opt<char>
|
||||||
@ -663,18 +662,17 @@ int main(int argc, char **argv, char * const *envp) {
|
|||||||
// and send it to the target.
|
// and send it to the target.
|
||||||
|
|
||||||
OwningPtr<RemoteTarget> 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()) {
|
if (!RemoteTarget::hostSupportsExternalRemoteTarget()) {
|
||||||
errs() << "Warning: host does not support external remote targets.\n"
|
errs() << "Warning: host does not support external remote targets.\n"
|
||||||
<< " Defaulting to simulated remote execution\n";
|
<< " Defaulting to simulated remote execution\n";
|
||||||
Target.reset(RemoteTarget::createRemoteTarget());
|
Target.reset(RemoteTarget::createRemoteTarget());
|
||||||
} else {
|
} else {
|
||||||
std::string ChildEXE = sys::FindProgramByName(MCJITRemoteProcess);
|
if (!sys::fs::exists(ChildExecPath)) {
|
||||||
if (ChildEXE == "") {
|
errs() << "Unable to find child target: '" << ChildExecPath << "'\n";
|
||||||
errs() << "Unable to find child target: '\''" << MCJITRemoteProcess << "\'\n";
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
Target.reset(RemoteTarget::createExternalRemoteTarget(ChildEXE));
|
Target.reset(RemoteTarget::createExternalRemoteTarget(ChildExecPath));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No child process name provided, use simulated remote execution.
|
// No child process name provided, use simulated remote execution.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user