diff --git a/spirv-to-dxil-sys/build.rs b/spirv-to-dxil-sys/build.rs index 83e360f..ee5db38 100644 --- a/spirv-to-dxil-sys/build.rs +++ b/spirv-to-dxil-sys/build.rs @@ -15,19 +15,16 @@ fn main() { let object_dst = cmake_dst.join("build/mesa/lib"); - // let vulkan_util_dst = cmake_dst.join("build/mesa/src/mesa/src/vulkan/util"); let header_dst = cmake_dst.join("build/mesa/src/mesa/src/microsoft/spirv_to_dxil"); let header_compiler_dst = cmake_dst.join("build/mesa/src/mesa/src/microsoft/compiler"); if cfg!(target_os = "windows") { println!("cargo:rustc-link-lib=Version"); - println!("cargo:rustc-link-lib=synchronization"); } println!("cargo:rustc-link-search=native={}", object_dst.display()); println!("cargo:rustc-link-lib=static=spirv_to_dxil"); println!("cargo:rustc-link-lib=static=vulkan_util"); - eprintln!("{:?}", cmake_dst); let bindings = bindgen::Builder::default() .header("native/wrapper.h") diff --git a/spirv-to-dxil-sys/native/CMakeLists.txt b/spirv-to-dxil-sys/native/CMakeLists.txt index 4901d64..f6a1b6d 100644 --- a/spirv-to-dxil-sys/native/CMakeLists.txt +++ b/spirv-to-dxil-sys/native/CMakeLists.txt @@ -21,21 +21,25 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} MESON_BUILD_TYPE) set(MESA_EXTRA_FLAGS -Dbuildtype=${MESON_BUILD_TYPE} + # enable spirv-to-dxil (obviously) + -Dspirv-to-dxil=true # force zink because we want libvulkan_util -Dgallium-drivers=zink + # set min-windows-version to 7 to remove need to link against synchronization.lib (we don't need futexes for the compiler) + -Dmin-windows-version=7 + + # disable everything we don't need. -Dvulkan-drivers= -Dopengl=false -Dglx=disabled -Dmicrosoft-clc=disabled -Dgallium-d3d12-video=disabled - -Dmin-windows-version=10 -Dgbm=disabled -Degl=disabled -Dgles1=disabled -Dgles2=disabled -Dllvm=disabled -Dshared-llvm=disabled - -Dspirv-to-dxil=true -Dplatforms=auto -Dzlib=disabled )