Skip to content

Commit

Permalink
fix: compile on mcjit
Browse files Browse the repository at this point in the history
  • Loading branch information
aceforeverd committed Jul 25, 2024
1 parent fe3500c commit dfa4603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions hybridse/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ thirdsrc

src/fe_version.h
src/hyhridse_version.h
src/case/test_cfg.h

# ignore docgen
style.xml
Expand Down
5 changes: 3 additions & 2 deletions hybridse/src/vm/jit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extern "C" {
#include "llvm/ExecutionEngine/JITSymbol.h"
#include "llvm/ExecutionEngine/Orc/CompileUtils.h"
#include "llvm/ExecutionEngine/Orc/Core.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"
#include "llvm/ExecutionEngine/Orc/IRCompileLayer.h"
#include "llvm/ExecutionEngine/Orc/IRTransformLayer.h"
Expand Down Expand Up @@ -314,15 +315,15 @@ bool HybridSeMcJitWrapper::AddModule(
} else {
execution_engine_->addModule(std::move(module));
}
if (jit_options_.IsEnableVTune()) {
if (jit_options_.IsEnableVtune()) {
auto listener = ::llvm::JITEventListener::createIntelJITEventListener();
if (listener == nullptr) {
LOG(WARNING) << "Intel jit events is not enabled";
} else {
execution_engine_->RegisterJITEventListener(listener);
}
}
if (jit_options_.IsEnableGDB()) {
if (jit_options_.IsEnableGdb()) {
auto listener =
::llvm::JITEventListener::createGDBRegistrationListener();
if (listener == nullptr) {
Expand Down

0 comments on commit dfa4603

Please sign in to comment.