diff --git a/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp b/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp --- a/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp @@ -1,10 +1,14 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include +#ifdef __MINGW32__ +// FIXME: remove after mingw-w64 adds this declaration. +extern "C" size_t __cdecl _aligned_msize(void *_Memory, size_t _Alignment, + size_t _Offset); +#endif + #define CHECK_ALIGNED(ptr,alignment) \ do { \ if (((uintptr_t)(ptr) % (alignment)) != 0) \ diff --git a/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp b/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp --- a/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp b/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp --- a/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp b/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp --- a/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp b/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp --- a/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s // Test the error output from a breakpoint. Assertion-like macros often end in diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/double_free.cpp b/compiler-rt/test/asan/TestCases/Windows/double_free.cpp --- a/compiler-rt/test/asan/TestCases/Windows/double_free.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/double_free.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp b/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp --- a/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp b/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp --- a/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp b/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp --- a/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s // Test the error output from an illegal instruction. diff --git a/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp b/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp --- a/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %env_asan_opts=handle_sigfpe=1 not %run %t 2>&1 | FileCheck %s // Test the error output from dividing by zero. diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/oom.cpp b/compiler-rt/test/asan/TestCases/Windows/oom.cpp --- a/compiler-rt/test/asan/TestCases/Windows/oom.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/oom.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-32-bits diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp --- a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp b/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp --- a/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-32-bits diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp b/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp b/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp --- a/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp b/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp --- a/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: %run %t // Just make sure we can parse diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s class Parent { diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %clang_cl_asan %Od %s %Fe%t // RUN: not %run %t 2>&1 | FileCheck %s class Parent { diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py --- a/compiler-rt/test/asan/lit.cfg.py +++ b/compiler-rt/test/asan/lit.cfg.py @@ -146,28 +146,38 @@ config.substitutions.append( ("%clang_asan_static ", build_invocation(clang_asan_static_cflags)) ) config.substitutions.append( ("%clangxx_asan_static ", build_invocation(clang_asan_static_cxxflags)) ) -# MSVC-specific tests might also use the clang-cl.exe driver. -if platform.system() == 'Windows' and target_is_msvc: - clang_cl_cxxflags = ["-Wno-deprecated-declarations", - "-WX", - "-D_HAS_EXCEPTIONS=0", - "-Zi"] + target_cflags - clang_cl_asan_cxxflags = ["-fsanitize=address"] + clang_cl_cxxflags - if config.asan_dynamic: - clang_cl_asan_cxxflags.append("-MD") - - clang_cl_invocation = build_invocation(clang_cl_cxxflags) - clang_cl_invocation = clang_cl_invocation.replace("clang.exe","clang-cl.exe") - config.substitutions.append( ("%clang_cl ", clang_cl_invocation) ) - - clang_cl_asan_invocation = build_invocation(clang_cl_asan_cxxflags) - clang_cl_asan_invocation = clang_cl_asan_invocation.replace("clang.exe","clang-cl.exe") - config.substitutions.append( ("%clang_cl_asan ", clang_cl_asan_invocation) ) - - base_lib = os.path.join(config.compiler_rt_libdir, "clang_rt.asan%%s%s.lib" % config.target_suffix) - config.substitutions.append( ("%asan_lib", base_lib % "") ) - config.substitutions.append( ("%asan_cxx_lib", base_lib % "_cxx") ) - config.substitutions.append( ("%asan_dll_thunk", base_lib % "_dll_thunk") ) +if platform.system() == 'Windows': + # MSVC-specific tests might also use the clang-cl.exe driver. + if target_is_msvc: + clang_cl_cxxflags = ["-Wno-deprecated-declarations", + "-WX", + "-D_HAS_EXCEPTIONS=0", + "-Zi"] + target_cflags + clang_cl_asan_cxxflags = ["-fsanitize=address"] + clang_cl_cxxflags + if config.asan_dynamic: + clang_cl_asan_cxxflags.append("-MD") + + clang_cl_invocation = build_invocation(clang_cl_cxxflags) + clang_cl_invocation = clang_cl_invocation.replace("clang.exe","clang-cl.exe") + config.substitutions.append( ("%clang_cl ", clang_cl_invocation) ) + + clang_cl_asan_invocation = build_invocation(clang_cl_asan_cxxflags) + clang_cl_asan_invocation = clang_cl_asan_invocation.replace("clang.exe","clang-cl.exe") + config.substitutions.append( ("%clang_cl_asan ", clang_cl_asan_invocation) ) + config.substitutions.append( ("%Od", "-Od") ) + config.substitutions.append( ("%Fe", "-Fe") ) + + base_lib = os.path.join(config.compiler_rt_libdir, "clang_rt.asan%%s%s.lib" % config.target_suffix) + config.substitutions.append( ("%asan_lib", base_lib % "") ) + config.substitutions.append( ("%asan_cxx_lib", base_lib % "_cxx") ) + config.substitutions.append( ("%asan_dll_thunk", base_lib % "_dll_thunk") ) + else: + # To make some of these tests work on MinGW target without changing their + # behaviour for MSVC target, substitute clang-cl flags with gcc-like ones. + config.substitutions.append( ("%clang_cl ", build_invocation(target_cxxflags)) ) + config.substitutions.append( ("%clang_cl_asan ", build_invocation(clang_asan_cxxflags)) ) + config.substitutions.append( ("%Od", "-O0") ) + config.substitutions.append( ("%Fe", "-o") ) # FIXME: De-hardcode this path. asan_source_dir = os.path.join(