[PATCH] D146908: [clang][MinGW] Add asan DLL lib before other libs and objects
Alvin Wong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 28 13:19:36 PDT 2023
alvinhochun added inline comments.
================
Comment at: clang/test/Driver/mingw-sanitizers.c:2
+// RUN: touch %t.a
+// RUN: %clang -target i686-windows-gnu %s -### -fsanitize=address -lcomponent %/t.a 2>&1 | FileCheck --check-prefixes=ASAN-ALL,ASAN-I686 -DINPUT=%/t.a %s
+// RUN: %clang -target x86_64-windows-gnu %s -### -fsanitize=address -lcomponent %/t.a 2>&1 | FileCheck --check-prefixes=ASAN-ALL,ASAN-X86_64 -DINPUT=%/t.a %s
----------------
mstorsjo wrote:
> You're using `%/t.a` here while the file you touch is `%t.a` - I don't think I have seen `%/t` anywhere here before. I do see that lit seems to replace it though... Is this an intentional thing (what's the difference to `%t` though?) or is it a consistently copied typo?
Ah yes, that is intentional. It's documented on https://llvm.org/docs/CommandGuide/lit.html#substitutions to be "%t but \ is replaced by /". The reason for this is that, the previous Windows pre-merge check failed because when `clang -###` prints the command line it quotes and backslash-escape the arguments., FileCheck cannot match the INPUT path with double backslashes. Using forward slashes avoids this issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146908/new/
https://reviews.llvm.org/D146908
More information about the cfe-commits
mailing list