File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ jobs:
166166 shell : bash
167167 run : |
168168 cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
169- -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows
169+ -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows -DHOST_CPU=${{ matrix.arch }}
170170 - name : MSBuild
171171 run : msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
172172 - name : bundle artifact tar
Original file line number Diff line number Diff line change @@ -223,7 +223,14 @@ endif()
223223
224224#default behaviour
225225include_directories (${CMAKE_SOURCE_DIR} )
226- add_compile_definitions (GIT_HOST_CPU="${CMAKE_SYSTEM_PROCESSOR} " )
226+
227+ # When cross-compiling, define HOST_CPU as the canonical name of the CPU on
228+ # which the built Git will run (for instance "x86_64").
229+ if (NOT HOST_CPU)
230+ add_compile_definitions (GIT_HOST_CPU="${CMAKE_SYSTEM_PROCESSOR} " )
231+ else ()
232+ add_compile_definitions (GIT_HOST_CPU="${HOST_CPU} " )
233+ endif ()
227234add_compile_definitions (SHA256_BLK INTERNAL_QSORT RUNTIME_PREFIX)
228235add_compile_definitions (NO_OPENSSL SHA1_DC SHA1DC_NO_STANDARD_INCLUDES
229236 SHA1DC_INIT_SAFE_HASH_DEFAULT=0
You can’t perform that action at this time.
0 commit comments