Skip to content

Commit

Permalink
fetch.ps1 verbose log
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Feb 29, 2024
1 parent b75fcd6 commit 18cf6b6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
42 changes: 24 additions & 18 deletions 1k/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ $manifest = @{
gcc = '9.0.0+';
cmake = '3.28.1+';
ninja = '1.11.1+';
python = '3.9.0+';
python = '3.8.0+';
jdk = '17.0.3+';
emsdk = '3.1.51';
cmdlinetools = '7.0+'; # android cmdlinetools
Expand Down Expand Up @@ -1206,7 +1206,7 @@ function setup_gclient() {
}

if ($env:PATH.IndexOf($gclient_dir) -eq -1) {
$env:PATH = "${gclient_dir}$ENV_PATH_SEP${env:PATH}"
$env:PATH = "${env:PATH}$ENV_PATH_SEP${gclient_dir}"
}
$env:DEPOT_TOOLS_WIN_TOOLCHAIN = 0
}
Expand Down Expand Up @@ -1530,23 +1530,23 @@ if (!$setupOnly) {
Set-Location $options.d
}

if ($options.xt -ne 'gn') {
# parsing build optimize flag from build_options
$buildOptions = [array]$options.xb
$nopts = $buildOptions.Count
$optimize_flag = $null
for ($i = 0; $i -lt $nopts; ++$i) {
$optv = $buildOptions[$i]
switch ($optv) {
'--config' {
$optimize_flag = $buildOptions[$i++ + 1]
}
'--target' {
$cmake_target = $buildOptions[$i++ + 1]
}
# parsing build optimize flag from build_options
$buildOptions = [array]$options.xb
$nopts = $buildOptions.Count
$optimize_flag = $null
for ($i = 0; $i -lt $nopts; ++$i) {
$optv = $buildOptions[$i]
switch ($optv) {
'--config' {
$optimize_flag = $buildOptions[$i++ + 1]
}
'--target' {
$cmake_target = $buildOptions[$i++ + 1]
}
}

}

if ($options.xt -ne 'gn') {
$BUILD_ALL_OPTIONS = @()
$BUILD_ALL_OPTIONS += $buildOptions
if (!$optimize_flag) {
Expand Down Expand Up @@ -1770,6 +1770,12 @@ if (!$setupOnly) {
$gn_buildargs_overrides += 'use_msvcr14x=true'
}

if($optimize_flag -eq 'Debug') {
$gn_buildargs_overrides += 'is_debug=true'
} else {
$gn_buildargs_overrides += 'is_debug=false'
}

Write-Output ("gn_buildargs_overrides=$gn_buildargs_overrides, Count={0}" -f $gn_buildargs_overrides.Count)

$BUILD_DIR = resolve_out_dir $null 'out/'
Expand All @@ -1780,7 +1786,7 @@ if (!$setupOnly) {

$gn_gen_args = @('gen', $BUILD_DIR)
if ($Global:is_win_family) {
$gn_gen_args += '--ide=vs2022', '--sln=angle-release'
$gn_gen_args += '--ide=vs2022', '--sln=angle'
}

if ($gn_buildargs_overrides) {
Expand Down
5 changes: 5 additions & 0 deletions 1k/fetch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,14 @@ if (!$cfg) {
if ($is_git_repo) {
$old_rev_hash = $(git -C $lib_src rev-parse HEAD)

println "old_rev_hash=$old_rev_hash"
$pred_rev_hash = $(git -C $lib_src rev-parse --verify --quiet "$revision^{}")
println "(1)parsed pred_rev_hash: $revision@$pred_rev_hash"

if(!$pred_rev_hash) {
git -C $lib_src fetch
$pred_rev_hash = $(git -C $lib_src rev-parse --verify --quiet "$revision^{}")
println "(2)parsed pred_rev_hash: $revision@$pred_rev_hash"
if(!$pred_rev_hash) {
throw "Could not found commit hash of $revision"
}
Expand All @@ -116,6 +119,8 @@ if (!$cfg) {
git -C $lib_src checkout $revision 1>$null 2>$null

$new_rev_hash = $(git -C $lib_src rev-parse HEAD)

println "checked out to $revision@$new_rev_hash"

if (!$is_rev_modified) {
$is_rev_modified = $old_rev_hash -ne $new_rev_hash
Expand Down
4 changes: 2 additions & 2 deletions src/angle/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ tag_dot2ul: false
targets: win32,winrt
cb_tool: gn
cb_target: libEGL
options: is_debug=false treat_warnings_as_errors=false
options: treat_warnings_as_errors=false
options_darwin: angle_enable_gl=false angle_enable_vulkan=false
options_msw: is_clang=false angle_enable_d3d9=false angle_enable_vulkan=false angle_enable_gl=false
options_msw: is_clang=false angle_enable_d3d9=true angle_enable_vulkan=false angle_enable_gl=false
2 changes: 1 addition & 1 deletion src/dawn/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repo: https://dawn.googlesource.com/dawn.git
ver: 121
ver: 122
tag_prefix: ''
tag_dot2ul: false
targets: win32,winrt
Expand Down

0 comments on commit 18cf6b6

Please sign in to comment.