File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 123
123
// --------------------------------------------------------------------+
124
124
125
125
// TODO refactor since __attribute__ is supported across many compiler
126
- #if defined(__GNUC__)
126
+ #if defined(__GNUC__) || defined (__clang__)
127
127
#define TU_ATTR_ALIGNED (Bytes ) __attribute__ ((aligned(Bytes)))
128
128
#define TU_ATTR_SECTION (sec_name ) __attribute__ ((section(#sec_name)))
129
129
#define TU_ATTR_PACKED __attribute__ ((packed))
175
175
#pragma GCC poison tud_vendor_control_request_cb
176
176
#endif
177
177
178
+ #if defined (__clang__)
179
+ #undef TU_ATTR_WEAK
180
+ #define TU_ATTR_WEAK __attribute__ ((weak_import))
181
+ #endif
182
+
178
183
#elif defined(__TI_COMPILER_VERSION__)
179
184
#define TU_ATTR_ALIGNED (Bytes ) __attribute__ ((aligned(Bytes)))
180
185
#define TU_ATTR_SECTION (sec_name ) __attribute__ ((section(#sec_name)))
You can’t perform that action at this time.
0 commit comments