umutex.h:52:17: error: 'dllexport' attribute ignored on explicit instantiation definition [-Werror,-Wignored-attributes]

Description

Android upgrade LLVM toolchain to r365631 and we got this error.

We temporarily suppress new ignored-attributes warning in Android: https://r.android.com/c/platform/external/icu/+/1102131

Activity

Show:

Jeff Genovy August 21, 2019 at 6:01 PM

From a link in the Android code review that points to discussion on a LLVM review:

Contrary to MSVC, GCC/MinGW needs to have the dllexport attribute on the template instantiation declaration, not on the definition.

Previously clang never marked explicit template instantiations as dllexport in MinGW mode, if the instantiation had a previous declaration, regardless of where the attribute was placed. This makes Clang behave like GCC in this regard, and allows using the same attribute form for both MinGW compilers.

I wonder if we might need to fork this for MSVC vs other compilers.

Details

Assignee

Reporter

Components

Labels

Priority

Fix versions

Created August 14, 2019 at 10:49 AM
Updated June 15, 2022 at 11:33 PM