tvm
tvm copied to clipboard
Exports on Windows
The definition of EXPORT is as follows:
#if defined(_WIN32) && defined(Halide_SHARED)
#ifdef Halide_EXPORTS
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __declspec(dllimport)
#endif
#else
#define EXPORT
#endif
This means that clients linking to the library from C++ must define Halide_SHARED before including any TVM headers, otherwise EXPORT is defined as empty, instead of __declspec(dllimport). Is there any harm in just removing the && defined(Halide_SHARED) condition from this? Note that TVM_DLL does not require any extra preprocessor defines, but fulfills a similar role.
Yes, we can remove that macro