Adding __attribute__((constructor/destructor)) for CLANG case.

CLANG supports __attribute__, but its documentation doesn't
mention support for constructor/destructor. Compiling with
clang and testing shows that it does support this.

Change-Id: Ie115b20634c26bda475cc09c20960d687fb7050b
This commit is contained in:
Nisanth M P
2017-10-24 16:36:36 +05:30
committed by prangana
parent 24e64a9d08
commit c669716790

View File

@@ -93,11 +93,11 @@
#define BLIS_ATTRIB_CTOR
#define BLIS_ATTRIB_DTOR
#elif defined(__clang__)
// CLANG supports __attribute__, but doesn't mention support for
// constructor/destructor. If we can confirm that CLANG supports
// this attribute, modify it to proper definition
#define BLIS_ATTRIB_CTOR
#define BLIS_ATTRIB_DTOR
// CLANG supports __attribute__, but its documentation doesn't
// mention support for constructor/destructor. Compiling with
// clang and testing shows that it does support.
#define BLIS_ATTRIB_CTOR __attribute__((constructor))
#define BLIS_ATTRIB_DTOR __attribute__((destructor))
#elif defined(__GNUC__)
#define BLIS_ATTRIB_CTOR __attribute__((constructor))
#define BLIS_ATTRIB_DTOR __attribute__((destructor))