1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

use system patchelf in eden fs build

Summary:
X-link: https://github.com/facebookincubator/velox/pull/7072

use system patchelf in eden fs build

Saves us from doing a fetch and build of autoconf, libtool, automake and patchelf during the arfifacts part of CI

X-link: https://github.com/facebook/sapling/pull/750

Reviewed By: sggutier

Differential Revision: D50313417

Pulled By: genevievehelsel

fbshipit-source-id: 7c585357c848c15a65c5797d6c8750d1119b6efd
This commit is contained in:
Alex Hornby
2023-10-16 12:10:14 -07:00
committed by Facebook GitHub Bot
parent d57a95d41e
commit 018b10ba1d
2 changed files with 24 additions and 8 deletions

View File

@@ -336,16 +336,21 @@ class ElfDeps(DepBase):
super(ElfDeps, self).__init__(buildopts, install_dirs, strip)
# We need patchelf to rewrite deps, so ensure that it is built...
subprocess.check_call([sys.executable, sys.argv[0], "build", "patchelf"])
args = [sys.executable, sys.argv[0]]
if buildopts.allow_system_packages:
args.append("--allow-system-packages")
subprocess.check_call(args + ["build", "patchelf"])
# ... and that we know where it lives
self.patchelf = os.path.join(
os.fsdecode(
subprocess.check_output(
[sys.executable, sys.argv[0], "show-inst-dir", "patchelf"]
).strip()
),
"bin/patchelf",
patchelf_install = os.fsdecode(
subprocess.check_output(args + ["show-inst-dir", "patchelf"]).strip()
)
if not patchelf_install:
# its a system package, so we assume it is in the path
patchelf_install = "patchelf"
else:
patchelf_install = os.path.join(patchelf_install, "bin", "patchelf")
self.patchelf = patchelf_install
def list_dynamic_deps(self, objfile):
out = (