[PATCH] D111952: [clang] [MinGW] Guess the right ix86 arch name spelling as sysroot
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 27 16:09:54 PDT 2021
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/MinGW.h:63
+ static void FixTripleArch(const Driver &D, llvm::Triple &Triple,
+ const llvm::opt::ArgList &Args);
----------------
Use `functionName` for newer functions. (It's unfortunate that Clang has much inconsistency but we should do the right thing for new methods.)
================
Comment at: clang/test/Driver/mingw-sysroot.cpp:49
+
+// RUN: env "PATH=%T/testroot-gcc/bin:%PATH%" %T/testroot-clang/bin/x86_64-w64-mingw32-clang -target x86_64-w64-mingw32 -m32 -rtlib=compiler-rt -stdlib=libstdc++ --sysroot="" -c -### %s 2>&1 | FileCheck -check-prefix=CHECK_TESTROOT_CLANG_I686 %s
+// CHECK_TESTROOT_CLANG_I686: "{{[^"]+}}/testroot-clang{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include"
----------------
Changing `PATH` seems unreliable for some test environments.
Any alternative way to test this?
`--target=` is preferred over `-target ` for driver options. `-target ` is legacy but we probably need to keep indefinitely for its wide usage.
`linux-cross.cpp` has some nice tests which may inspire this file ? :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111952/new/
https://reviews.llvm.org/D111952
More information about the cfe-commits
mailing list