Use dllexport for all declarations in FuzzerInterface.h Use it for clang
even though clang supports default visibility attribute to prevent a
warning from being thrown when LLVMFuzzerMutate is defined with dllexport.
This makes FUZZER_INTERFACE_VISIBILITY (FuzzerInterface.h) consistent with
ATTRIBUTE_INTERFACE (FuzzerDefs.h) when using clang on Windows.
Details
- Reviewers
vitalybuka morehouse - Commits
- rG8f7fc95ab7aa: [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h
rCRT352395: [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h
rL352395: [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h
Diff Detail
- Build Status
Buildable 27396 Build 27395: arc lint + arc unit
Event Timeline
Please take a look.
This change silences a warning when compiling libFuzzer for Windows with clang.
It shouldn't affect anything other than compiling libFuzzer with clang on Windows.
compiler-rt/lib/fuzzer/FuzzerInterface.h | ||
---|---|---|
30 | Why only 32-bit? Also, shouldn't this be #if defined(_WIN32)? |
compiler-rt/lib/fuzzer/FuzzerInterface.h | ||
---|---|---|
30 |
_WIN32 is defined for 64-bit and 32-bit builds. We use it in FuzzerDefs.h to set LIBFUZZER_WINDOWS.
I've changed it to be this. Funny that you noticed this though, since I came to the opposite conclusion when bikeshedding before uploading the initial patch. |
Why only 32-bit? Also, shouldn't this be #if defined(_WIN32)?