@@ -38,6 +38,7 @@ async function compile() {
3838async function createProject ( ) {
3939 await processThenRestoreCWD ( async ( ) => {
4040 process . env . DEPOT_TOOLS_WIN_TOOLCHAIN = '0'
41+ //process.env.DEPOT_TOOLS_UPDATE = '0'
4142 process . chdir ( kDawnPath ) ;
4243 fs . copyFileSync ( 'scripts/standalone-with-node.gclient' , '.gclient' ) ;
4344 await execute ( 'gclient' , [ 'metrics' , '--opt-out' ] ) ;
@@ -54,6 +55,7 @@ async function createProject() {
5455 '-DDAWN_BUILD_NODE_BINDINGS=1' ,
5556 '-DDAWN_USE_X11=OFF' ,
5657 `-DCMAKE_BUILD_TYPE=${ kConfig } ` ,
58+ ...addElemIf ( isMac , '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' ) ,
5759 ...addElemIf ( isWin , '-DCMAKE_SYSTEM_VERSION=10.0.26100.0' ) ,
5860 ...addElemIf ( isMac , '-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' ) ,
5961 ] ) ;
@@ -71,7 +73,8 @@ async function copyResult(filepath, target) {
7173async function main ( ) {
7274 const compileOnly = process . argv [ 2 ] === '--compile-only' ;
7375 try {
74- const target = `${ process . platform } -${ process . arch } ` ;
76+ const arch = isMac ? 'universal' : process . arch ;
77+ const target = `${ process . platform } -${ arch } ` ;
7578 console . log ( 'building for:' , target ) ;
7679 if ( ! compileOnly ) {
7780 await execute ( 'git' , [ 'submodule' , 'update' , '--init' ] ) ;
0 commit comments