From 9ee523d1307d1ea37d3db4862d4bbc940f6fe939 Mon Sep 17 00:00:00 2001 From: Meow King Date: Wed, 31 Jul 2024 15:10:17 +0800 Subject: [PATCH] test(ci): windows --- CMakeLists.txt | 8 +++++--- pyproject.toml | 2 +- scripts/action/install_llvm.sh | 5 +---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5165cef..d6c3900 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,9 +72,11 @@ target_link_libraries(llvmpym_ext PRIVATE ${llvm_libs} fmt::fmt) # although we are going build a full llvm python binding :- # TODO for MacOS immitate llvmlite only expose certain symbols. Can it work? # https://github.com/numba/llvmlite/blob/78ebf9bf188379b2642112aff388480384306c6b/ffi/CMakeLists.txt#L76C53-L76C61 -set_property(TARGET llvmpym_ext APPEND_STRING PROPERTY LINK_FLAGS "-flto") -if(NOT APPLE) - set_property(TARGET llvmpym_ext APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--exclude-libs,ALL") +if(UNIX) + set_property(TARGET llvmpym_ext APPEND_STRING PROPERTY LINK_FLAGS "-flto") + if(NOT APPLE) + set_property(TARGET llvmpym_ext APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--exclude-libs,ALL") + endif() endif() # Stub Files diff --git a/pyproject.toml b/pyproject.toml index 43c361b..188d238 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ manylinux-x86_64-image = "manylinux_2_28" manylinux-aarch64-image = "manylinux_2_28" [tool.cibuildwheel.windows] -environment = { SKBUILD_CMAKE_ARGS="-DLLVM_DIR=D:/a/llvmpym/llvmpym/llvm-build/lib/cmake/llvm;-DZLIB_ROOT=$VCPKG_INSTALLATION_ROOT/installed/x64-windows/share/zlib" } +environment = { SKBUILD_CMAKE_ARGS="-DLLVM_DIR=D:/a/llvmpym/llvmpym/llvm-build/lib/cmake/llvm" } [tool.cibuildwheel.macos.environment] # Needed for full C++17 support diff --git a/scripts/action/install_llvm.sh b/scripts/action/install_llvm.sh index 81e237e..d0dc903 100644 --- a/scripts/action/install_llvm.sh +++ b/scripts/action/install_llvm.sh @@ -27,7 +27,7 @@ elif [[ "$sys" == "Msys" ]]; then root_llvm_dir_name="clang+llvm-18.1.8-x86_64-pc-windows-msvc" # install libraries - vcpkg install zlib + # vcpkg install zlib # MacOS elif [[ "$sys" == "Darwin" ]]; then # Mac (only for 14 or later, i.e. apple silicon) @@ -42,6 +42,3 @@ curl -L -o ./llvm-build.tar.xz "$url" tar -xf ./llvm-build.tar.xz mv "$root_llvm_dir_name" ./llvm-build -ls -echo ------------ -ls ./llvm-build