Commit 512ddad7 authored by Artur Wojcik's avatar Artur Wojcik
Browse files

make test jit.cpp just to pass, proper fix needed

parent 8b3ed5d5
...@@ -28,9 +28,15 @@ ...@@ -28,9 +28,15 @@
#include <migraphx/make_op.hpp> #include <migraphx/make_op.hpp>
#include <test.hpp> #include <test.hpp>
#ifndef _WIN32
#define EXPORT_SYMBOL R"migraphx(extern "C")migraphx"
#else
#define EXPORT_SYMBOL R"migraphx(__declspec(dllexport))migraphx"
#endif
// NOLINTNEXTLINE // NOLINTNEXTLINE
const std::string add_42_src = R"migraphx( const std::string add_42_src = EXPORT_SYMBOL R"migraphx(
extern "C" int add(int x) int add(int x)
{ {
return x+42; return x+42;
} }
...@@ -70,7 +76,11 @@ std::function<F> compile_module(const migraphx::module& m, const std::string& fl ...@@ -70,7 +76,11 @@ std::function<F> compile_module(const migraphx::module& m, const std::string& fl
TEST_CASE(simple_run) TEST_CASE(simple_run)
{ {
#ifdef _WIN32
auto f = compile_function<int(int)>(add_42_src, "", "?add@@YAHH@Z");
#else
auto f = compile_function<int(int)>(add_42_src, "", "add"); auto f = compile_function<int(int)>(add_42_src, "", "add");
#endif
EXPECT(f(8) == 50); EXPECT(f(8) == 50);
EXPECT(f(10) == 52); EXPECT(f(10) == 52);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment