@@ -10,11 +10,13 @@ import chalk from "chalk";
1010
1111import {
1212 DEFAULT_APPLE_TRIPLETS ,
13+ isAppleSupported ,
1314 getAppleBuildArgs ,
1415 getAppleConfigureCmakeArgs ,
1516} from "./apple.js" ;
1617import {
1718 DEFAULT_ANDROID_TRIPLETS ,
19+ isAndroidSupported ,
1820 getAndroidConfigureCmakeArgs ,
1921} from "./android.js" ;
2022import { getWeakNodeApiVariables } from "./weak-node-api.js" ;
@@ -129,19 +131,23 @@ export const program = new Command("cmake-rn")
129131 }
130132
131133 if ( triplets . size === 0 ) {
134+ if ( isAndroidSupported ( ) ) {
135+ if ( process . arch === "arm64" ) {
136+ triplets . add ( "aarch64-linux-android" ) ;
137+ } else if ( process . arch === "x64" ) {
138+ triplets . add ( "x86_64-linux-android" ) ;
139+ }
140+ }
141+ if ( isAppleSupported ( ) ) {
142+ if ( process . arch === "arm64" ) {
143+ triplets . add ( "arm64-apple-ios-sim" ) ;
144+ }
145+ }
132146 console . error (
133- "Nothing to build 🤷" ,
134- "Please specify at least one triplet with" ,
135- chalk . dim ( "--triplet" ) ,
136- `(or use the ${ chalk . dim ( "--android" ) } or ${ chalk . dim (
137- "--apple"
138- ) } shorthands)`
147+ chalk . yellowBright ( "ℹ" ) ,
148+ "Using default triplets" ,
149+ chalk . dim ( "(" + [ ...triplets ] . join ( ", " ) + ")" )
139150 ) ;
140- for ( const triplet of SUPPORTED_TRIPLETS ) {
141- console . error ( `${ chalk . dim ( "--triplet" ) } ${ triplet } ` ) ;
142- }
143- process . exitCode = 1 ;
144- return ;
145151 }
146152
147153 const tripletContext = [ ...triplets ] . map ( ( triplet ) => {
0 commit comments