From afe6a5bd6e6109ba0f26006622cbe3a57090da58 Mon Sep 17 00:00:00 2001 From: Puneet Kaushik Date: Thu, 11 Jul 2019 08:13:49 -0700 Subject: [PATCH] getdeps: Extend is_objfile() to Windows class to only select files with .exe extension Summary: is_objfile() is used to find the executable files in the given project. Getdeps will only find and copy the dependencies of the binaries identified by this function. On Windows we will copy only the dependencies for an exe file. Reviewed By: chadaustin Differential Revision: D16185962 fbshipit-source-id: f6b5089401b242514a845e3a97b3804051d93c1c --- build/fbcode_builder/getdeps/dyndeps.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/fbcode_builder/getdeps/dyndeps.py b/build/fbcode_builder/getdeps/dyndeps.py index d300ddaeb..7b39f8623 100644 --- a/build/fbcode_builder/getdeps/dyndeps.py +++ b/build/fbcode_builder/getdeps/dyndeps.py @@ -191,6 +191,13 @@ class WinDeps(DepBase): return False return True + def is_objfile(self, objfile): + if not os.path.isfile(objfile): + return False + if objfile.lower().endswith(".exe"): + return True + return False + class ElfDeps(DepBase): def __init__(self, buildopts, install_dirs):