From e70ec2e50f41f8dd966cbd90090b8a2dfee316e1 Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Sun, 2 Apr 2023 02:16:07 +0800 Subject: [PATCH] [asan][test][win] Make report_after_syminitialize test less brittle Instead of relying on one of the two commands failing on MinGW target, just use the `%if` conditional substitution feature from lit, which is much less brittle. Amends 5888a47914f44ffaf102fcb7afd3500706fe753f Differential Revision: https://reviews.llvm.org/D147382 --- .../test/asan/TestCases/Windows/report_after_syminitialize.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp b/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp index 45bb6f3..10e5663 100644 --- a/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp @@ -3,12 +3,7 @@ // not support it, so we need to specify extra flags to get the compiler to // generate PDB debug info. -// The first build command is intended for MSVC target, which fails on MinGW. -// The second build command contains the flags required to get PDB debug info -// on a MinGW build, which fails on MSVC. - -// RUN: %clangxx_asan -O0 %s -o %t \ -// RUN: || %clangxx_asan -gcodeview -gcolumn-info -Wl,--pdb= -O0 %s -o %t -ldbghelp +// RUN: %clangxx_asan %if target={{.*-windows-gnu}} %{ -gcodeview -gcolumn-info -Wl,--pdb= -ldbghelp %} -O0 %s -o %t // RUN: %env_asan_opts=external_symbolizer_path=non-existent\\\\asdf not %run %t 2>&1 | FileCheck %s #include -- 2.7.4