Disable INIT_FINI unittest on Windows (#3132)

MSVC doesn't support library constructor/destructor, let's disable
the related unittest and clarify the documentation and error messages.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
This commit is contained in:
Csaba Osztrogonác
2019-09-20 10:04:55 +02:00
committed by Dániel Bátyai
parent c05686b668
commit dc44b8b933
4 changed files with 14 additions and 3 deletions
@@ -44,6 +44,10 @@ typedef struct jerryx_native_module_t
* library constructor/destructor support.
*/
#ifdef ENABLE_INIT_FINI
#ifdef _MSC_VER
#error "`FEATURE_INIT_FINI` build flag isn't supported on Windows, because Microsoft Visual C/C++ Compiler \
doesn't support library constructors and destructors."
#endif
#define JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE __attribute__((constructor))
#define JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE __attribute__((destructor))
#define JERRYX_MODULE_REGISTRATION_QUALIFIER static