mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix Hermes opt mode for local mac runs (#55138)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55138 Some tests were failing locally on Mac, since //arvr/mode/mac-arm/opt doesn't correctly undefine REACT_NATIVE_DEBUG. Use `//xplat/mode/hermes/opt` as a short-cut since that directly defines rn_build_mode. Changelog: [Internal] Reviewed By: zeyap Differential Revision: D90536112 fbshipit-source-id: 55aeb78970c9d210206a6d86cd3e57d55b0a6396
This commit is contained in:
1 parent
393eca54eb
commit
bc8970ec9e
1 file changed
+7
-2
+7
-2
@@ -54,8 +54,12 @@ export function getHermesCompilerTarget(variant: HermesVariant): string {
|
||||
export function getBuckModesForPlatform(
|
||||
enableRelease: boolean = false,
|
||||
): $ReadOnlyArray<string> {
|
||||
let mode = enableRelease ? 'opt' : 'dev';
|
||||
let modes = ['@//xplat/mode/react-native/granite'];
|
||||
if (enableRelease) {
|
||||
modes.push('@//xplat/mode/hermes/opt');
|
||||
}
|
||||
|
||||
let mode = enableRelease ? 'opt' : 'dev';
|
||||
if (enableRelease) {
|
||||
if (EnvironmentOptions.enableASAN || EnvironmentOptions.enableTSAN) {
|
||||
printConsoleLog({
|
||||
@@ -101,7 +105,8 @@ export function getBuckModesForPlatform(
|
||||
throw new Error(`Unsupported platform: ${os.platform()}`);
|
||||
}
|
||||
|
||||
return ['@//xplat/mode/react-native/granite', osPlatform];
|
||||
modes.push(osPlatform);
|
||||
return modes;
|
||||
}
|
||||
|
||||
// TODO: T240293839 Remove when we get rid of RN_USE_ANIMATION_BACKEND preprocessor flag
|
||||
|
||||
Reference in new issue
Block a user