diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b5f95ef7..822afa0af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,10 @@ macro(torch_mlir_enable_werror) endif() endmacro() +if(MSVC) + add_definitions(-D_USE_MATH_DEFINES) +endif() + #------------------------------------------------------------------------------- # Configure out-of-tree vs in-tree build #------------------------------------------------------------------------------- diff --git a/build_tools/python_deploy/build_windows_ci.sh b/build_tools/python_deploy/build_windows_ci.sh index c5da1adf6..2e1648679 100644 --- a/build_tools/python_deploy/build_windows_ci.sh +++ b/build_tools/python_deploy/build_windows_ci.sh @@ -14,6 +14,7 @@ cmake -GNinja -Bbuild \ -DLLVM_EXTERNAL_PROJECTS="torch-mlir" \ -DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR="$PWD" \ -DPython3_EXECUTABLE="$(which python)" \ + -DTORCH_MLIR_ENABLE_STABLEHLO=OFF \ $GITHUB_WORKSPACE/externals/llvm-project/llvm cmake --build build --config Release