[PATCH] D71285: [fuzzer] Add basic support for emscripten.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 07:44:32 PST 2019


hctim accepted this revision.
hctim marked an inline comment as done.
hctim added inline comments.
This revision is now accepted and ready to land.


================
Comment at: compiler-rt/lib/fuzzer/FuzzerDriver.cpp:287
+  // now.
+  if (LIBFUZZER_EMSCRIPTEN)
+    return;
----------------
metzman wrote:
> hctim wrote:
> > Can we hoist this into the caller - having:
> > 
> > ```
> > if (!LIBFUZZER_EMSCRIPTEN)
> >   StartRssThread(F, A);
> > ```
> > 
> > ... seems clearer to me than silently not doing the thing the function says it does some of the time.
> Done. 
> Do you like the way I did it now (with an `#if` macro?) or do you want the `if ` to be code? (I guess the macro way might result in a complaint about unused function and is IMO uglier but clearer.
I believe this is the [[ http://llvm-cs.pcc.me.uk/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp#2113 | canonical way ]] to guard features around macros, so LGTM. If we have any `-Wunused-function` problems then we can guard against it later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71285/new/

https://reviews.llvm.org/D71285





More information about the llvm-commits mailing list