[PATCH] D147861: [compiler-rt] [test] [ubsan] Build .cpp files with %clangxx

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 8 13:12:20 PDT 2023


mstorsjo created this revision.
mstorsjo added reviewers: phosek, alvinhochun, vitalybuka.
Herald added subscribers: Enna1, dberris.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

This fixes linker errors in mingw configurations, where the ubsan
runtime needs the C++ standard library when instrumenting C++ code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147861

Files:
  compiler-rt/test/ubsan/TestCases/Pointer/align-assume-ignorelist.cpp


Index: compiler-rt/test/ubsan/TestCases/Pointer/align-assume-ignorelist.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/Pointer/align-assume-ignorelist.cpp
+++ compiler-rt/test/ubsan/TestCases/Pointer/align-assume-ignorelist.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang -fsanitize=alignment -fno-sanitize-recover=alignment                           -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --implicit-check-not=" assumption "
+// RUN: %clangxx -fsanitize=alignment -fno-sanitize-recover=alignment                           -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --implicit-check-not=" assumption "
 
 // RUN: rm -f %tmp
 // RUN: echo "[alignment]" >> %tmp
 // RUN: echo "fun:main" >> %tmp
-// RUN: %clang -fsanitize=alignment -fno-sanitize-recover=alignment -fsanitize-ignorelist=%tmp -O0 %s -o %t && %run %t 2>&1
+// RUN: %clangxx -fsanitize=alignment -fno-sanitize-recover=alignment -fsanitize-ignorelist=%tmp -O0 %s -o %t && %run %t 2>&1
 
 #include <stdlib.h>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147861.511926.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230408/7f3e26e4/attachment.bin>


More information about the llvm-commits mailing list