[LLD] Cyclic dependency between ReaderWriter and YAML backend
Shankar Easwaran
shankare at codeaurora.org
Tue Sep 3 13:07:52 PDT 2013
On 9/3/2013 2:53 PM, Nick Kledzik wrote:
> The Core layer of knows nothing about file formats and just performs the merge/link of atom graphs. All testing for the Core layer is done using YAML test cases. That is why they are “close”.
>
> Joerg has not posted what the circular dependency is. Maybe it can be fixed by moving some trivial code around.
>
This is a much bigger problem as BUILD_SHARED_LIBS has not been thought
about.
Below is illustration of the failure.
When BUILD_SHARED_LIBS is "ON", the lld build generates libraries
* lldCore
* lldYAML
* lldELF
....
The linker-script-test (which tests parsing the linker script), links
with lldCore, which happens to work with static linking but fails with
dynamic linking.
This is because a symbol createReaderYAML is undefined, which can be
resolved only if the link contains the lldYAML library.
But if the linker script test, say it starts referring ELF, the link
line needs to add lldELF in there and so on ....
This can be solved for now by merging in lldYAML code within core
(or)
The issue can be solved with adding lldYAML to CMakeLists.txt ?
Thanks
Shankar Easwaran
More information about the llvm-commits
mailing list