[PATCH] D62733: Add FuzzedDataProvider helper class / single header library.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 11:06:44 PDT 2019
rnk added a comment.
In D62733#1535103 <https://reviews.llvm.org/D62733#1535103>, @Dor1s wrote:
> Nico, Reid, Jonathan, I'd greatly appreciate your Windows expertise here. If I remove lines 11-16 from `lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp`, I'm getting the following link errors on Windows:
Typically the CRT gets pulled into the link by `/defaultlib:libcmt` flags in the .drective section of the object file. Objects compiled with `clang-cl` and `cl` will have these directives, but objects compiled by plain `clang` will not, because `clang` has no flag that the user can use to indicate whether the static or dynamic CRT should be used (`/MT` vs `/MD`). That spelling obviously conflicts with the .d file related options `-MD`, and we never invented a GCC-style spelling, so it doesn't exist, and we also didn't try guessing which CRT is in use. I think that's what's going on here: objects in RTFuzzer are compiled by MSVC, but the unittests build configuration uses clang because they were designed to test compiler instrumentation.
As a fix, try adding `/defaultlib:libcmt` to link flags.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62733/new/
https://reviews.llvm.org/D62733
More information about the llvm-commits
mailing list