Skip to content

Commit f6c51ea

Browse files
committed
[ORC-RT] Fix unit tests on Linux.
The unit tests may transiently depend on __orc_rt_log_error, which is usually provided by an alias when loading the runtime through the JIT. The unit tests statically link the runtime, so this patch provides a fixed definition.
1 parent b33c807 commit f6c51ea

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

compiler-rt/lib/orc/tests/unit/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ set(UNITTEST_SOURCES
22
adt_test.cpp
33
bitmask_enum_test.cpp
44
c_api_test.cpp
5+
common.cpp
56
endian_test.cpp
67
error_test.cpp
78
executor_address_test.cpp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
3+
/// Defined so that tests can use code that logs errors.
4+
extern "C" void __orc_rt_log_error(const char *ErrMsg) {
5+
fprintf(stderr, "orc runtime error: %s\n", ErrMsg);
6+
}

0 commit comments

Comments
 (0)