Incorrect mac linking command line? |
||||||
Issue description* On Mac * $ gn gen out/libfuzzer '--args=use_libfuzzer=true is_asan=true enable_nacl=false mac_deployment_target="10.7"' --check && ninja -C out/libfuzzer -v url_parse_fuzzer Results in the following error: [805/807] rm -f obj/testing/libfuzzer/libfuzzer_main.a && ./gyp-mac-tool filter-libtool libtool -static -o obj/testing/libfuzzer/libfuzzer_main.a FAILED: rm -f obj/testing/libfuzzer/libfuzzer_main.a && ./gyp-mac-tool filter-libtool libtool -static -o obj/testing/libfuzzer/libfuzzer_main.a error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols] Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] Build rule: https://code.google.com/p/chromium/codesearch#chromium/src/testing/libfuzzer/BUILD.gn&l=17 PS Have to be synced beyond https://chromium.googlesource.com/chromium/src/+/d476d8d12ec348f2f8ceb7012f6cb56369c7fb16
,
Apr 18 2016
,
Apr 19 2016
You have a static library with no sources. That doesn't with on Mac (loudly) and windows (silently, but the build never becomes clean). Whoever added the libfuzzer_main target should own this bug.
,
Apr 19 2016
Also, not an infra bug and no need to make this internal
,
Apr 20 2016
,
Apr 20 2016
I haven't been working on the libfuzzer build stuff, but adding some people who might be able to help.
,
Apr 20 2016
@thakis do you think we should add a dummy .c file just for Mac compatibility? I'm not sure which other options are there. I would definitely appreciate mac toolchain definition to solve this problem for me. As far as the GN reference says, this does look like canonical usage of source_set.
,
Apr 20 2016
Make this not a static_library but a source_set if possible. (also, not just mac: it's broken on windows too, and weird on linux as well.) If there are no sources in the target, why do you need the target at all? can the target exist only when it actually contains files? Somewhat hard to answer without knowing anything about what you're trying to do :-) What are you trying to do?
,
Apr 20 2016
I guess I was stuck trying to make it work. Thank you for unsticking me. :) Replaced static_library by source_set. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by aizatsky@chromium.org
, Apr 18 2016