20 lines · cpp
1// Just make sure we can link an implib into another DLL2// This used to fail between r212699 and r212814.3// RUN: %clang_cl_asan -DCONFIG=1 %s -c -Fo%t.1.obj4// RUN: lld-link /nologo /DLL /OUT:%t.1.dll %t.1.obj %asan_lib %asan_thunk5// RUN: %clang_cl_asan -DCONFIG=2 %s -c -Fo%t.2.obj6// RUN: lld-link /nologo /DLL /OUT:%t.2.dll %t.2.obj %t.1.lib %asan_lib %asan_thunk7// REQUIRES: lld-available8 9#if CONFIG==110extern "C" __declspec(dllexport) int f1() {11 int x = 0;12 return 1;13}14#else15extern "C" __declspec(dllexport) int f2() {16 int x = 0;17 return 2;18}19#endif20