3
3
4
4
import { chdir } from "process" ;
5
5
6
- import yargs from "yargs" ;
7
- import { hideBin } from "yargs/helpers" ;
8
-
9
6
import type { Platform } from "./dawn-configuration" ;
10
7
import { $ , mapKeys } from "./util" ;
11
8
import {
@@ -17,37 +14,6 @@ import {
17
14
projectRoot ,
18
15
} from "./dawn-configuration" ;
19
16
20
- const { argv } = yargs ( hideBin ( process . argv ) )
21
- . option ( "exclude" , {
22
- type : "string" ,
23
- describe : "Comma-separated list of platforms to exclude" ,
24
- } )
25
- . option ( "includeOnly" , {
26
- type : "string" ,
27
- describe : "Comma-separated list of platforms to include exclusively" ,
28
- } ) ;
29
-
30
- // Function to filter platforms based on exclude list
31
- function filterPlatforms < T extends string > (
32
- platforms : T [ ] ,
33
- excludeList : string [ ] ,
34
- includeOnlyList : string [ ] ,
35
- ) : T [ ] {
36
- if ( includeOnlyList . length > 0 ) {
37
- return platforms . filter ( ( platform ) => includeOnlyList . includes ( platform ) ) ;
38
- } else {
39
- return platforms . filter ( ( platform ) => ! excludeList . includes ( platform ) ) ;
40
- }
41
- }
42
-
43
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
- const args = argv as any ;
45
- const excludeList = args . exclude ? args . exclude . split ( "," ) : [ ] ;
46
- const includeOnlyList = args . includeOnly ? args . includeOnly . split ( "," ) : [ ] ;
47
-
48
- const platforms = ( plts : string [ ] ) =>
49
- filterPlatforms ( plts , excludeList , includeOnlyList ) as Platform [ ] ;
50
-
51
17
const commonArgs = {
52
18
CMAKE_BUILD_TYPE : "Release" ,
53
19
BUILD_SAMPLES : "OFF" ,
@@ -73,7 +39,7 @@ const PLATFORM_MAP: Record<string, string> = {
73
39
} ;
74
40
75
41
const android = {
76
- platforms : platforms ( [ "arm64-v8a" , "armeabi-v7a" , "x86" , "x86_64" ] ) ,
42
+ platforms : [ "arm64-v8a" , "armeabi-v7a" , "x86" , "x86_64" ] as Platform [ ] ,
77
43
args : {
78
44
CMAKE_TOOLCHAIN_FILE : "$ANDROID_NDK/build/cmake/android.toolchain.cmake" ,
79
45
ANDROID_PLATFORM : "android-26" ,
@@ -83,9 +49,9 @@ const android = {
83
49
84
50
const apple = {
85
51
matrix : {
86
- arm64 : platforms ( [ "iphoneos" , "iphonesimulator" , "xros" , "xrsimulator" ] ) ,
87
- x86_64 : platforms ( [ "iphonesimulator" ] ) ,
88
- universal : platforms ( [ "macosx" ] ) ,
52
+ arm64 : [ "iphoneos" , "iphonesimulator" , "xros" , "xrsimulator" ] ,
53
+ x86_64 : [ "iphonesimulator" ] ,
54
+ universal : [ "macosx" ] ,
89
55
} ,
90
56
args : {
91
57
CMAKE_TOOLCHAIN_FILE : `${ __dirname } /apple.toolchain.cmake` ,
@@ -96,6 +62,7 @@ const apple = {
96
62
( async ( ) => {
97
63
process . chdir ( "../.." ) ;
98
64
process . chdir ( "externals/dawn" ) ;
65
+ $ ( "git submodule update --init third_party/abseil-cpp" ) ;
99
66
$ (
100
67
"git reset --hard HEAD && cd third_party/abseil-cpp && git reset --hard HEAD && cd ../.." ,
101
68
) ;
0 commit comments