Issue 109558
Summary How to use llvm-link appropriately?
Labels new issue
Assignees
Reporter HoshinoStranding
    I have encountered some problems when using the command `llvm-link` under llvm-15. 
There are two bitcode files from the same project: file1.bc and file2.bc, and they don't have any multiple definiton. When I try to use llvm-link to link them, some problems occured:
(1) When I execute the command 
`llvm-link file1.bc file2.bc -o result.bc` or `llvm-link file2.bc file1.bc -o result.bc`, no symbol is included in result.bc
(2) When I execute the command `llvm-link file1.bc --override=file2.bc -o result.bc` or `llvm-link file2.bc --override=file1.bc -o result.bc`, only symbols from file2.bc or file1.bc are included in result.bc

Then I execute the command `llvm-link file1.bc --override=file1.bc --override=file2.bc -o result.bc`, I finally link the files correctly.

My question is: 
(1) What is the cause of the problem I encountered?
(2) How to use `llvm-link` and the option `--override` correctly when two files have multiple definition or don't have any multiple definition?
(3) How to use llvm-link to link multiple files?

I would be very grateful if someone answer my question.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to