Commit 328e888
committed
Use __declspec(selectany) on any windows compiler, not only MSVC
GCC and Clang (in MinGW mode) also do support __declspec(selectany),
and using __declspec(selectany) instead of __attribute__((weak)) on
Windows avoids including the data multiple times in the linked
image. (__attribute__((weak)), on COFF at least, only avoids a conflict
for multiple definitions but doesn't deduplicate the content, like
__declspec(selectany) does.)
This avoids the fact that Clang doesn't fully implement
__attribute__((weak)) on Windows yet.1 parent eb931aa commit 328e888
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
0 commit comments