Add a debugger entry to the builder script
This commit is contained in:
parent
489cb9610e
commit
783f4e65b2
7
builder
7
builder
|
@ -46,7 +46,7 @@ set -e
|
|||
# -----------------------------------------------------------------------------
|
||||
|
||||
command=$1
|
||||
VERSION="0.5.0"
|
||||
VERSION="0.6.0"
|
||||
|
||||
# Serene subprojects. We use this array to run common tasks on all the projects
|
||||
# like running the test cases
|
||||
|
@ -202,6 +202,11 @@ function run() { ## Runs `serenec` and passes all the given aruguments to it
|
|||
"$BUILD_DIR"/serenec/serenec "$@"
|
||||
}
|
||||
|
||||
function lldb-run() { ## Runs `serenec` under lldb
|
||||
LD_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so) \
|
||||
lldb -- "$BUILD_DIR"/serenec/serenec "$@"
|
||||
}
|
||||
|
||||
function repl() { ## Runs `serene-repl` and passes all the given aruguments to it
|
||||
LD_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so) \
|
||||
"$BUILD_DIR"/serene-repl/serene-repl "$@"
|
||||
|
|
|
@ -406,6 +406,7 @@ llvm::Error Halley::createEmptyNS(const char *name) {
|
|||
return llvm::Error::success();
|
||||
};
|
||||
|
||||
// TODO: Remove this function before prod release
|
||||
llvm::Error Halley::loadModule(const char *file) {
|
||||
assert(file && "File is nullptr: loadModule");
|
||||
auto llvmContext = ctx->genLLVMContext();
|
||||
|
@ -421,6 +422,7 @@ llvm::Error Halley::loadModule(const char *file) {
|
|||
|
||||
return llvm::Error::success();
|
||||
};
|
||||
// /TODO
|
||||
|
||||
MaybeEngine makeHalleyJIT(std::unique_ptr<SereneContext> ctx) {
|
||||
llvm::orc::JITTargetMachineBuilder jtmb(ctx->triple);
|
||||
|
|
|
@ -291,6 +291,13 @@ int main(int argc, char *argv[]) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
err = engine->loadModule("/home/lxsameer/test.ll");
|
||||
|
||||
if (err) {
|
||||
llvm::errs() << "Error: " << err << "'\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
// // TODO: handle the outputDir by not forcing it. it should be
|
||||
// // default to the current working dir
|
||||
// if (outputDir == "-") {
|
||||
|
|
Loading…
Reference in New Issue