[compiler-rt] [test] [profile] Skip an MSVC-style linker parameter in mingw mode
authorMartin Storsjö <martin@martin.st>
Wed, 12 Apr 2023 11:01:19 +0000 (11:01 +0000)
committerMartin Storsjö <martin@martin.st>
Thu, 13 Apr 2023 09:03:34 +0000 (12:03 +0300)
This parameter isn't essential for the execution of this test, so just
skip it when running tests in mingw mode.

Differential Revision: https://reviews.llvm.org/D148165

compiler-rt/test/profile/Windows/coverage-linkage.cpp

index 648b3fb..315c533 100644 (file)
@@ -3,7 +3,7 @@
 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
 // RUN: llvm-profdata show %t.profraw --all-functions | FileCheck %s
 
-// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -Wl,-opt:ref %s -o %t
+// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections %if target={{.*-windows-msvc.*}} %{ -Wl,-opt:ref %} %s -o %t
 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
 // RUN: llvm-profdata show %t.profraw --all-functions | FileCheck %s