Automatically download buck2 when not provided (#2619)
Summary: Resolve buck2, in order of precedence: 1) Use explicitly provided buck2 path (via -DBUCK2). Warn if version is incorrect. 2) Check system buck2. Use if version is correct. 3) Look for a cached (previously downloaded) buck2 binary. 3) Download and cache buck2. Pull Request resolved: https://github.com/pytorch/executorch/pull/2619 Test Plan: Repeated on x86_64 linux and m1 mac. Build with explicit buck2 (correct version). Confirm that provided buck is used without warning. Build with explicit buck2 (wrong version). Confirm that warning is shown. Build without explicit buck (system buck wrong version). Confirm that buck is downloaded and cached. Build succeeds. Build without explicit buck (system buck correct version). Confirm that buck is downloaded and cached. Build succeeds. Build without explicit buck (no system buck). Confirm that buck is downloaded and cached. Build succeeds. Reviewed By: dbort Differential Revision: D55292710 Pulled By: GregoryComer fbshipit-source-id: c29a79eaf737c21c33543a6175049eb7ced8da2e
G
Gregory Comer committed
14996cc9160f32f23ff6df77ae1e853697e58b96
Parent: 3527bd7
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 3/26/2024, 2:10:05 PM