create .gn build config in libfuzzer upstream |
|||
Issue descriptionList libfuzzer source files in the upstream config, then depend on them in chromium repo.
,
Mar 1 2016
I don't mind, but others in LLVM may be opposed to this. We should use some form of globing in the chromium, see issue 590869
,
Mar 1 2016
scratch that. I am actually quite against this change in llvm, it's ridiculous. We can not test it upstream and so the gn file will be broken have the time we add/remove files.
,
Mar 1 2016
I've also tried to implement this locally (did the same change as Mike) and got the following problem when building any fuzzer (for example, zlib_uncompress_fuzzer): $ gn clean out/Release && gn gen out/Release && ninja -C out/Release -j 2048 zlib_uncompress_fuzzer && out/Release/zlib_uncompress_fuzzer -h Done. Wrote 3208 targets from 865 files in 849ms ninja: Entering directory `out/Release' [83/88] SOLINK ./libc++.so clang: warning: argument unused during compilation: '-pthread' [88/88] LINK ./zlib_uncompress_fuzzer FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -B../../third_party/binutils/Linux_x64/Release/bin -fuse-ld=gold -pthread -m64 -Wl,-O1 -Wl,--gc-sections --sysroot=../../build/linux/debian_wheezy_amd64-sysroot -fsanitize=address -Wl,-rpath-link=../Release -Wl,--disable-new-dtags -Wl,-rpath=\$ORIGIN/. -Wl,-rpath-link=. -Wl,-u_sanitizer_options_link_helper -fsanitize=address -L. -o "./zlib_uncompress_fuzzer" -Wl,--start-group @"./zlib_uncompress_fuzzer.rsp" ./libc++.so -Wl,--end-group -ldl -lrt ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/build/config/sanitizers/options_sources/sanitizer_options.o: multiple definition of '__asan_default_options' ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: obj/third_party/llvm/lib/Fuzzer/libfuzzer_sources/FuzzerSanitizerOptions.o: previous definition here ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: warning: Cannot export local symbol '__asan_default_options' clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
,
Mar 1 2016
I was going to delete FuzzerSanitizerOptions.cpp. Let me do it *now*.
,
Mar 1 2016
It seems that source_set is not the same as list of source files, because files get compiled for source_set target. Then during linking we have the same symbols in source_set and //build/config/sanitizers/. Honestly I don't understand how to mitigate this, we just need a 'macros' for list of source files or force wildcard support in GN configs.
,
Mar 1 2016
http://llvm.org/viewvc/llvm-project?rev=262354&view=rev removed FuzzerSanitizerOptions.cpp Please update the gn file to remove FuzzerSanitizerOptions.cpp Then we should use globing.
,
Mar 2 2016
,
Mar 28 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by aizatsky@chromium.org
, Mar 1 2016