1 | // Just make sure we can link an implib into another DLL |
2 | // This used to fail between r212699 and r212814. |
3 | // RUN: %clang_cl_asan -DCONFIG=1 %s -c -Fo%t.1.obj |
4 | // RUN: lld-link /nologo /DLL /OUT:%t.1.dll %t.1.obj %asan_dll_thunk |
5 | // RUN: %clang_cl_asan -DCONFIG=2 %s -c -Fo%t.2.obj |
6 | // RUN: lld-link /nologo /DLL /OUT:%t.2.dll %t.2.obj %t.1.lib %asan_dll_thunk |
7 | // REQUIRES: asan-static-runtime |
8 | // REQUIRES: lld-available |
9 | |
10 | #if CONFIG==1 |
11 | extern "C" __declspec(dllexport) int f1() { |
12 | int x = 0; |
13 | return 1; |
14 | } |
15 | #else |
16 | extern "C" __declspec(dllexport) int f2() { |
17 | int x = 0; |
18 | return 2; |
19 | } |
20 | #endif |
21 | |