Display link command line when building for windows

Command line is limited in length on windows so meson/ninja puts it in a response file and passes that to the linker instead. Only problem is, ninja -v displays only the part of the command line where it tells link.exe where the response file is, not what's in the response file. So I just had the script print it. Care must also be taken for the script to properly fail if ninja fails, but not before the command line is printed.

Also add /GL and /LCTG to msvc command lines because they can't hurt. Right?
This commit is contained in:
Tamás Bálint Misius 2022-09-11 11:55:01 +02:00
parent f42c8372d2
commit fefafa3b3d
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
2 changed files with 12 additions and 1 deletions

11
.github/build.sh vendored
View File

@ -276,7 +276,16 @@ ANDROID_INI
fi
$meson_configure build
cd build
ninja -v
if [[ $BSH_BUILD_PLATFORM == windows ]]; then
set +e
ninja -v -d keeprsp
ninja_code=$?
set -e
cat powder.exe.rsp
[[ $ninja_code == 0 ]];
else
ninja -v
fi
strip=strip
objcopy=objcopy
strip_target=$ASSET_PATH

View File

@ -182,10 +182,12 @@ if is_msvc
args_msvc += [
'/Oy-',
'/fp:fast',
'/GL',
]
project_link_args += [
'/OPT:REF',
'/OPT:ICF',
'/LTCG',
]
endif
project_c_args += args_msvc