Skip to content

Commit ad86f57

Browse files
committed
_build.sh: minor cleanup for Windows targets 2
1 parent cd4e334 commit ad86f57

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

_build.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,7 @@ build_single_target() {
652652
export _CMAKE_GLOBAL='-DCMAKE_BUILD_TYPE=Release'
653653
export _CMAKE_CXX_GLOBAL=''
654654

655-
if [ "${_OS}" = 'win' ]; then
656-
_CMAKE_GLOBAL="-DCMAKE_SYSTEM_NAME=Windows ${_CMAKE_GLOBAL}"
657-
elif [ "${_OS}" = 'linux' ]; then
655+
if [ "${_OS}" = 'linux' ]; then
658656
# Override defaults such as: 'lib/aarch64-linux-gnu'
659657
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"
660658

@@ -673,12 +671,12 @@ build_single_target() {
673671
unset CC
674672

675673
if [ "${_OS}" = 'win' ]; then
674+
_CMAKE_GLOBAL="-DCMAKE_SYSTEM_NAME=Windows ${_CMAKE_GLOBAL}"
675+
676676
[ "${_CPU}" = 'x86' ] && _RCFLAGS_GLOBAL="${_RCFLAGS_GLOBAL} --target=pe-i386"
677677
[ "${_CPU}" = 'x64' ] && _RCFLAGS_GLOBAL="${_RCFLAGS_GLOBAL} --target=pe-x86-64"
678678
[ "${_CPU}" = 'a64' ] && _RCFLAGS_GLOBAL="${_RCFLAGS_GLOBAL} --target=${_TRIPLET}" # llvm-windres supports triplets here. https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-rc/llvm-rc.cpp
679-
fi
680679

681-
if [ "${_OS}" = 'win' ]; then
682680
if [ "${_HOSTOS}" = 'win' ]; then
683681
# '-G MSYS Makefiles' command-line option is problematic due to spaces
684682
# and unwanted escaping/splitting. Pass it via envvar instead.

0 commit comments

Comments
 (0)