Skip to content

Commit

Permalink
Default to android for local builds on macOS
Browse files Browse the repository at this point in the history
Summary: Buck uses the host platform as the target platform when otherwise unspecified. As a side-effect, local builds on macOS default to 'macos' platform monikers without explicit modifiers, when the desired default has historically been 'android'. This fixes by using an already-in-use required constraint setting value for 'macos' platform targeting, allowing the 'android' fallback to work as expected.

Reviewed By: robhogan

Differential Revision: D68902337

fbshipit-source-id: e48c72371187bd16b9daf10a92c3d0d95e01daf0
  • Loading branch information
rozele authored and facebook-github-bot committed Jan 30, 2025
1 parent 9b5f1e6 commit 1fae638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prelude/js/js.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def _select_platform():
"DEFAULT": select({
"DEFAULT": "android",
"config//os/constraints:iphoneos": "ios",
"config//os/constraints:macos": "macos",
"config//os/constraints:windows": "windows",
}),
"config//react-native:macos": "macos",
# TODO(T210407097): Remove after deleting //third-party/microsoft-fork-of-react-native
"fbsource//tools/build_defs/js/config:macos_legacy": "macos_legacy",
"fbsource//tools/build_defs/js/config:platform_override_android": "android",
Expand Down

0 comments on commit 1fae638

Please sign in to comment.