From 1fae638e9401f7e70ac1e0ca31261672f1edabd2 Mon Sep 17 00:00:00 2001 From: Eric Rozell Date: Thu, 30 Jan 2025 12:43:23 -0800 Subject: [PATCH] Default to `android` for local builds on macOS 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 --- prelude/js/js.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prelude/js/js.bzl b/prelude/js/js.bzl index debac134dcdee..a500ba2175518 100644 --- a/prelude/js/js.bzl +++ b/prelude/js/js.bzl @@ -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",