Commit 93c3a4e2 authored by Wez Furlong's avatar Wez Furlong Committed by Facebook Github Bot

getdeps: fixup-dyn-deps: use patchelf from our manifest on linux

Summary:
On linux we use `patchelf` to manipulate dynamic deps but it
isn't guaranteed to be installed everywhere.  We have a manifest file
that describes how to build it, but so far nothing has told getdeps
that it should build it.

This diff updates the ELF dep munging code to literally run
`getdeps.py build patchelf` and then use that patchelf binary to
manipulate the object files.

Refs: https://github.com/facebook/watchman/pull/750

Reviewed By: pkaush

Differential Revision: D17705351

Pulled By: wez

fbshipit-source-id: 358ef239edb389fbd51fa023ff553963aa80b6c7
parent 17cd1d8e
......@@ -201,7 +201,16 @@ class WinDeps(DepBase):
class ElfDeps(DepBase):
def __init__(self, buildopts, install_dirs):
super(ElfDeps, self).__init__(buildopts, install_dirs)
self.patchelf = path_search(self.env, "patchelf")
# We need patchelf to rewrite deps, so ensure that it is built...
subprocess.check_call([sys.executable, sys.argv[0], "build", "patchelf"])
# ... and that we know where it lives
self.patchelf = os.path.join(
subprocess.check_output(
[sys.executable, sys.argv[0], "show-inst-dir", "patchelf"]
).strip(),
"bin/patchelf",
)
def list_dynamic_deps(self, objfile):
out = (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment