[PATCH] D51571: [Xray] Darwin providing defined value for weak symbols to fix linkage issue

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 3 17:11:21 PDT 2018


I understand that there’s a problem here, but the question is whether is
this the right solution.

First, do the tests even run for macOS/Darwin in compiler-rt? I don’t think
they do as we’re still running them on Linux hosts (see lit configuration
for the test cases).

Second, these symbols ought to be generated by the linker if the right
sections are in the MachO binary (they are array extents). Does the LLVM
backend even generate the instrumentation map for Darwin yet? Maybe that
change has to happen first?

Lastly, is there a way to reproduce these? Is there a buildbot failing? Can
you share a link to the failure? When did it start and can we revert the
change that cause it while we investigate what the proper solutions are to
making XRay work on Darwin?

On Mon, 3 Sep 2018 at 12:15 am, David CARLIER via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> devnexen added a comment.
>
> "/usr/bin/ld" -demangle -lto_library
> /Users/devnexen/Contribs/LLVMbuild/lib/libLTO.dylib -no_deduplicate
> -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o a.out
> -L/Users/devnexen/Contribs/TestSuite/
> /var/folders/0y/qp64bhnx57x5gvjdr34k0jg80000gn/T/fdrmode-bench-3b0d58.o
> -lbenchmark -lc++
> /Users/devnexen/Contribs/LLVMbuild/lib/clang/8.0.0/lib/darwin/libclang_rt.xray_osx.a
> /Users/devnexen/Contribs/LLVMbuild/lib/clang/8.0.0/lib/darwin/libclang_rt.xray-basic_osx.a
> /Users/devnexen/Contribs/LLVMbuild/lib/clang/8.0.0/lib/darwin/libclang_rt.xray-fdr_osx.a
> -lSystem
> /Users/devnexen/Contribs/LLVMbuild/lib/clang/8.0.0/lib/darwin/libclang_rt.osx.a
> Undefined symbols for architecture x86_64:
>
>   "___start_xray_fn_idx", referenced from:
>       ___xray_init in libclang_rt.xray_osx.a(xray_init.cc.o)
>   "___start_xray_instr_map", referenced from:
>       ___xray_init in libclang_rt.xray_osx.a(xray_init.cc.o)
>   "___stop_xray_fn_idx", referenced from:
>       ___xray_init in libclang_rt.xray_osx.a(xray_init.cc.o)
>   "___stop_xray_instr_map", referenced from:
>       ___xray_init in libclang_rt.xray_osx.a(xray_init.cc.o)
>
> ld: symbol(s) not found for architecture x86_64
> clang-8: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> Another apple folk reported me the issue as well.
>
>
> Repository:
>   rCRT Compiler Runtime
>
> https://reviews.llvm.org/D51571
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-- 
Dean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/3f42a4b6/attachment.html>


More information about the llvm-commits mailing list