SIGN IN SIGN UP

oss: Add `buck_build` cfg (#2902)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/2902

I'd like a simple way to check whether a build is using cargo or buck. Unfortunately, that doesn't exist right now.

I suggest replacing the `buck_oss_build` cfg with a simpler `buck_build` cfg. This will be set internally via package files and externally via the OSS shim. (TBD: Should we set it in the macros internally too?)

People can still recover the `#[cfg(buck_oss_build)]` behavior by checking `#[cfg(all(fbcode_build, buck_build))]`.

Also, this diff cleans up some linter overrides via `prelude = native`

Reviewed By: dtolnay

Differential Revision: D55791957

fbshipit-source-id: 1a411ce0ad831015cf55f8722512490e33d77454
J
Jakob Degen committed
c4054f166ef5b2abdf0e211da36f8dc19872acf3
Parent: d309e9d
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 4/9/2024, 7:41:10 PM