Skip to content

Commit

Permalink
Merge pull request #72 from isuruf/win-arm64
Browse files Browse the repository at this point in the history
Win arm64
  • Loading branch information
isuruf authored Jul 6, 2023
2 parents 93c9fa6 + ad8af64 commit 649df64
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .ci_support/win_arm64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
c_compiler:
- vs2022
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
target_platform:
- win-arm64
vc:
- '14'
3 changes: 3 additions & 0 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ conda_forge_output_validation: true
build_platform:
osx_arm64: osx_64
linux_ppc64le: linux_64
win_arm64: win_64
github:
branch_name: main
tooling_branch_name: main
conda_build:
pkg_format: '2'
test: native_and_emulated
18 changes: 13 additions & 5 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@echo on

set LIB=%LIBRARY_LIB%;%LIB%
set LIBPATH=%LIBRARY_LIB%;%LIBPATH%
set INCLUDE=%LIBRARY_INC%;%INCLUDE%;%RECIPE_DIR%

echo if( DEFINED ZLIB_OUTPUT_NAME ) >> "CMakeLists.txt"
echo set_target_properties(zlib PROPERTIES OUTPUT_NAME ${ZLIB_OUTPUT_NAME}) >> "CMakeLists.txt"
echo endif() >> "CMakeLists.txt"
echo message("CMAKE_CROSS_COMPILING: ${CMAKE_CROSSCOMPILING}") >> "CMakeLists.txt"

:: Configure.
:: -DZLIB_WINAPI switches to WINAPI calling convention. See Q7 in DLL_FAQ.txt.
Expand All @@ -14,7 +17,7 @@ cmake -G "NMake Makefiles" ^
-D CMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% ^
-D CMAKE_C_FLAGS="-DZLIB_WINAPI " ^
-D ZLIB_OUTPUT_NAME="zlibwapi" ^
%SRC_DIR%
%CMAKE_ARGS% %SRC_DIR%
if errorlevel 1 exit 1

:: For logging.
Expand All @@ -25,8 +28,11 @@ cmake --build %SRC_DIR% --config Release
if errorlevel 1 exit 1

:: Test.
ctest
if errorlevel 1 exit 1
:: TODO: check if there exists a emulator
if NOT "%CONDA_BUILD_CROSS_COMPILATION%" == "1" (
ctest
if errorlevel 1 exit 1
)

:: Copy built zlibwapi.dll with the same name provided by http://www.winimage.com/zLibDll/
:: This is needed for example for cuDNN
Expand All @@ -53,8 +59,10 @@ cmake --build %SRC_DIR% --target INSTALL --config Release --clean-first
if errorlevel 1 exit 1

:: Test.
ctest
if errorlevel 1 exit 1
if NOT "%CONDA_BUILD_CROSS_COMPILATION%" == "1" (
ctest
if errorlevel 1 exit 1
)

:: Some OSS libraries are happier if z.lib exists, even though it's not typical on Windows.
copy %LIBRARY_LIB%\zlib.lib %LIBRARY_LIB%\z.lib || exit 1
Expand Down

0 comments on commit 649df64

Please sign in to comment.