-
Notifications
You must be signed in to change notification settings - Fork 10
Description
So usually if I build a binary that needs a shared library (which is not installed in the system) I can do something like add a directory structure:
bin
|-- my_ _bin
lib
|-- shared_lib.so
And then when linking in the shared lib set the rpath as $ORIGIN/../lib/ which helps discover the shared libs.
How do I do this with the cc_rules? I can see that the shared lib never makes it to the plz-out/bin so setting something relative seems hard.
Even if I add an additional lib to the output directory using the optional_outs it still does not make it to the plz-out/bin directory which makes running things which need a shared library hard with plz run //path/to/executable. Any suggestions/help with this would be nice.
Currently I have something like:
linker_flags = ["--rpath=$ORIGIN/../../gen/path/to/mylib/"]
Which is pretty nasty (and not very scalable sadly)
Ideally this should be just --rpath=$ORIGIN/../path/to/mylib/