[llvm-dev] EngineBuilder(std::move(Owner)).create() return null
mayuyu.io via llvm-dev
llvm-dev at lists.llvm.org
Wed Sep 18 21:08:50 PDT 2019
It depends. If you need the JIT backend(you should be since Interpreter is barely usable), you’ll need to include MCJIT Instead
Zhang
> 在 2019年9月19日,10:58,Yafei Liu <yfliu at mobvoi.com> 写道:
>
> tanks, I got the error message and it seems I need to #include "llvm/ExecutionEngine/Interpreter.h"
>
>> On Wed, Sep 18, 2019 at 7:16 PM mayuyu.io <admin at mayuyu.io> wrote:
>> SetErrString , its argument is a pointer to a string. Use it before calling other methods and inspect it after calling Engine-Building methods
>>
>> Zhang
>>
>>> 在 2019年9月18日,17:17,Yafei Liu <yfliu at mobvoi.com> 写道:
>>>
>>> I found a private ErrorStr member, but didn't find the get function of this member, could you tell me how I can get the error message?
>>>
>>>> On Wed, Sep 18, 2019 at 4:02 PM mayuyu.io <admin at mayuyu.io> wrote:
>>>> Isn’t there a method in EngineBuilder to get the error message or something?
>>>> I assume it’s you didn’t link in the JIT module
>>>>
>>>> Zhang
>>>>
>>>>> 在 2019年9月18日,11:04,Yafei Liu via llvm-dev <llvm-dev at lists.llvm.org> 写道:
>>>>>
>>>>> I just copy the latest code in HowToUseJIT and run, but the EngineBuilder(std::move(Owner)).create() keeps return null, any idea why?
>>>>>
>>>>> Here's my CMakeList:
>>>>> cmake_minimum_required(VERSION 3.12)
>>>>> project(llvm_test)
>>>>>
>>>>> set(CMAKE_CXX_STANDARD 14)
>>>>>
>>>>> find_package(LLVM REQUIRED CONFIG)
>>>>> llvm_map_components_to_libnames(llvm_libs support core irreader orcjit native)
>>>>>
>>>>> add_executable(llvm_test main.cpp)
>>>>> target_include_directories(llvm_test PUBLIC ${LLVM_INCLUDE_DIRS})
>>>>> target_compile_definitions(llvm_test PUBLIC ${LLVM_DEFINITIONS})
>>>>> target_link_libraries(llvm_test ${llvm_libs})
>>>>> _______________________________________________
>>>>> LLVM Developers mailing list
>>>>> llvm-dev at lists.llvm.org
>>>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190919/c4de8f71/attachment-0001.html>
More information about the llvm-dev
mailing list