862e473c2e
`DART_EXTERN` in `dart_api_dl.h` was missing `__declspec(dllexport)` on Windows, causing `Dart_InitializeApiDL` to not be visible. Using `DART_EXPORT` instead doesn't work because the definitions added by `DART_API_ALL_DL_SYMBOLS` do not support having a 'used' attribute. Instead, define a `DART_EXPORT_DL` for these which is identical but without the 'used' attribute. Note that the precompiler `DART_SHARED_LIB` macro must be defined for `__declspec(dllexport)` to be part of `DART_EXPORT`/`DART_EXPORT_DL`. Also fixes `#define DART_EXTERN_C` to be `extern` in C. Without this, the linker will see duplicate symbols for things `DART_EXPORT`ed when the `dart_api_dl.h` is included in C files. TEST=SDK build on all OSes Change-Id: I0af1d46d22409599203d9be310d54bd16c6a5b59 Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,dart-sdk-win-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215550 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>