@@ -240,8 +240,8 @@ foreach ($arg in $args) {
240240 if (! $optName ) {
241241 if ($arg.StartsWith (' -' )) {
242242 $optName = $arg.SubString (1 )
243- if ($optName.EndsWith (' :' )) {
244- $optName = $optName.TrimEnd (' :' )
243+ if ($optName.EndsWith (' :' )) {
244+ $optName = $optName.TrimEnd (' :' )
245245 }
246246 if ($optName.startsWith (' j' )) {
247247 $job_count = $null
@@ -687,7 +687,7 @@ function setup_nuget() {
687687}
688688
689689# setup python3, not install automatically
690- # ensure python3.exe is python.exe to solve unexpected error, i.e.
690+ # ensure python3.exe is python.exe to solve unexpected error, i.e.
691691# google gclient require python3.exe, on windows 10/11 will locate to
692692# a dummy C:\Users\halx99\AppData\Local\Microsoft\WindowsApps\python3.exe cause
693693# shit strange error
@@ -718,7 +718,7 @@ function setup_glslcc() {
718718 $b1k.rmdirs ($glslcc_bin )
719719 $glslcc_pkg = Join-Path $external_prefix " glslcc-$suffix "
720720 $b1k.del ($glslcc_pkg )
721-
721+
722722 $glscc_url = devtool_url glslcc- $glslcc_ver - $suffix
723723
724724 download_and_expand $glscc_url " $glslcc_pkg " $glslcc_bin
@@ -854,7 +854,7 @@ function setup_nsis() {
854854 $nsis_prog , $nsis_ver = find_prog - name ' nsis' - cmd ' makensis' - params ' /VERSION' - path $nsis_bin - silent $true
855855 if (! $nsis_prog ) {
856856 $b1k.rmdirs ($nsis_bin )
857-
857+
858858 download_and_expand " https://nchc.dl.sourceforge.net/project/nsis/NSIS%203/$nsis_ver /nsis-$nsis_ver .zip" " $external_prefix /nsis-$nsis_ver .zip" " $external_prefix "
859859 $nsis_dir = " $nsis_bin -$nsis_ver "
860860 if ($b1k.isdir ($nsis_dir )) {
@@ -1196,7 +1196,7 @@ function setup_msvc() {
11961196# google gn build system, current windows only for build angleproject/dawn on windows
11971197function setup_gclient () {
11981198 $OutputEncoding = [console ]::InputEncoding = [console ]::OutputEncoding = New-Object System.Text.UTF8Encoding
1199-
1199+
12001200 if (! $ninja_prog ) {
12011201 $ninja_prog = setup_ninja
12021202 }
@@ -1575,7 +1575,7 @@ if (!$setupOnly) {
15751575 }
15761576 }
15771577 }
1578-
1578+
15791579 if ($options.xt -ne ' gn' ) {
15801580 $BUILD_ALL_OPTIONS = @ ()
15811581 $BUILD_ALL_OPTIONS += $buildOptions
@@ -1654,7 +1654,7 @@ if (!$setupOnly) {
16541654 break
16551655 }
16561656 }
1657-
1657+
16581658 if (! $BUILD_DIR ) {
16591659 $BUILD_DIR = resolve_out_dir $cmake_build_prefix ' build_'
16601660 }
@@ -1703,7 +1703,11 @@ if (!$setupOnly) {
17031703 }
17041704 }
17051705 else {
1706- & $build_tool tasks
1706+ if ($optimize_flag -eq ' Debug' ) {
1707+ & $build_tool configureCMakeDebug prepareKotlinBuildScriptModel $CONFIG_ALL_OPTIONS | Out-Host
1708+ } else {
1709+ & $build_tool configureCMakeRelWithDebInfo prepareKotlinBuildScriptModel $CONFIG_ALL_OPTIONS | Out-Host
1710+ }
17071711 }
17081712 Pop-Location
17091713 }
@@ -1748,7 +1752,7 @@ if (!$setupOnly) {
17481752 # apply additional build options
17491753 $BUILD_ALL_OPTIONS += " --parallel"
17501754 $BUILD_ALL_OPTIONS += " $ ( $options.j ) "
1751-
1755+
17521756 if (($cmake_generator -eq ' Xcode' ) -and ! $BUILD_ALL_OPTIONS.Contains (' --verbose' )) {
17531757 $BUILD_ALL_OPTIONS += ' --' , ' -quiet'
17541758 }
@@ -1767,10 +1771,10 @@ if (!$setupOnly) {
17671771 else {
17681772 # google gclient/gn build system
17691773 # refer: https://chromium.googlesource.com/chromium/src/+/eca97f87e275a7c9c5b7f13a65ff8635f0821d46/tools/gn/docs/reference.md#args_specifies-build-arguments-overrides-examples
1770-
1774+
17711775 $stored_env_path = $null
17721776 $gn_buildargs_overrides = @ ()
1773-
1777+
17741778 if ($Global :is_winrt ) {
17751779 $gn_buildargs_overrides += ' target_os=\"winuwp\"'
17761780 }
@@ -1808,7 +1812,7 @@ if (!$setupOnly) {
18081812 }
18091813
18101814 Write-Output (" gn_buildargs_overrides=$gn_buildargs_overrides , Count={0}" -f $gn_buildargs_overrides.Count )
1811-
1815+
18121816 $BUILD_DIR = resolve_out_dir $null ' out/'
18131817
18141818 if ($rebuild ) {
0 commit comments