From e75a3ca2c063fd85bfeca40b415375b113dc0ded Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Wed, 23 Mar 2022 22:20:41 +0300 Subject: [PATCH 01/23] [llvm] update to v14.0.0 --- ports/llvm/0002-fix-install-paths.patch | 98 ++++++---- ports/llvm/0003-fix-openmp-debug.patch | 25 --- ports/llvm/0005-fix-tools-path.patch | 2 +- .../0007-fix-compiler-rt-install-path.patch | 12 +- ports/llvm/0009-fix-tools-install-path.patch | 185 ++---------------- ports/llvm/0010-fix-libffi.patch | 24 +-- ports/llvm/0011-fix-libxml2.patch | 34 ---- ports/llvm/portfile.cmake | 68 ++++--- ports/llvm/vcpkg.json | 22 ++- 9 files changed, 141 insertions(+), 329 deletions(-) delete mode 100644 ports/llvm/0003-fix-openmp-debug.patch delete mode 100644 ports/llvm/0011-fix-libxml2.patch diff --git a/ports/llvm/0002-fix-install-paths.patch b/ports/llvm/0002-fix-install-paths.patch index 3582bcbfd2cc61..cdf5b2c799ac0c 100644 --- a/ports/llvm/0002-fix-install-paths.patch +++ b/ports/llvm/0002-fix-install-paths.patch @@ -1,18 +1,19 @@ - clang/cmake/modules/CMakeLists.txt | 4 ++-- - flang/cmake/modules/CMakeLists.txt | 4 ++-- - lld/cmake/modules/CMakeLists.txt | 4 ++-- - llvm/cmake/modules/AddLLVM.cmake | 2 +- - llvm/cmake/modules/CMakeLists.txt | 2 +- - mlir/cmake/modules/CMakeLists.txt | 4 ++-- - polly/cmake/CMakeLists.txt | 4 ++-- - pstl/CMakeLists.txt | 4 ++-- - 8 files changed, 14 insertions(+), 14 deletions(-) + clang/cmake/modules/CMakeLists.txt | 4 ++-- + compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 2 +- + flang/cmake/modules/CMakeLists.txt | 4 ++-- + lld/cmake/modules/CMakeLists.txt | 4 ++-- + llvm/cmake/modules/AddLLVM.cmake | 2 +- + llvm/cmake/modules/CMakeLists.txt | 2 +- + mlir/cmake/modules/CMakeLists.txt | 4 ++-- + mlir/test/CMakeLists.txt | 2 +- + polly/cmake/CMakeLists.txt | 4 ++-- + 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt -index 561665d58cad..3c73878a4483 100644 +index c6f6ce9fe5d6..fc886b23a1a8 100644 --- a/clang/cmake/modules/CMakeLists.txt +++ b/clang/cmake/modules/CMakeLists.txt -@@ -3,11 +3,11 @@ include(LLVMDistributionSupport) +@@ -5,11 +5,11 @@ include(FindPrefixFromConfig) # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but # the usual CMake convention seems to be ${Project}Targets.cmake. @@ -26,11 +27,24 @@ index 561665d58cad..3c73878a4483 100644 set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) +diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +index 052095801aae..f3402793b60c 100644 +--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake ++++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +@@ -376,7 +376,7 @@ macro(load_llvm_config) + file(TO_CMAKE_PATH ${LLVM_CMAKE_DIR_FROM_LLVM_CONFIG} LLVM_CMAKE_DIR) + else() + file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) +- set(LLVM_CMAKE_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") ++ set(LLVM_CMAKE_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/share/llvm") + endif() + + set(LLVM_CMAKE_INCLUDE_FILE "${LLVM_CMAKE_DIR}/LLVMConfig.cmake") diff --git a/flang/cmake/modules/CMakeLists.txt b/flang/cmake/modules/CMakeLists.txt -index e46498a6bc35..2e922f8ca89d 100644 +index 170568c80dde..1bf6d6a829e2 100644 --- a/flang/cmake/modules/CMakeLists.txt +++ b/flang/cmake/modules/CMakeLists.txt -@@ -1,11 +1,11 @@ +@@ -4,11 +4,11 @@ include(FindPrefixFromConfig) # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but # the usual CMake convention seems to be ${Project}Targets.cmake. @@ -45,10 +59,10 @@ index e46498a6bc35..2e922f8ca89d 100644 get_property(FLANG_EXPORTS GLOBAL PROPERTY FLANG_EXPORTS) diff --git a/lld/cmake/modules/CMakeLists.txt b/lld/cmake/modules/CMakeLists.txt -index 62d03fa901dd..09b0f54ee8c3 100644 +index 760c9d5f8d87..acd8a65808f5 100644 --- a/lld/cmake/modules/CMakeLists.txt +++ b/lld/cmake/modules/CMakeLists.txt -@@ -1,11 +1,11 @@ +@@ -4,11 +4,11 @@ include(FindPrefixFromConfig) # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but # the usual CMake convention seems to be ${Project}Targets.cmake. @@ -63,10 +77,10 @@ index 62d03fa901dd..09b0f54ee8c3 100644 get_property(LLD_EXPORTS GLOBAL PROPERTY LLD_EXPORTS) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 29e40f45fef8..e9094e9b8eb2 100644 +index 37bc98f9e021..7cbfa2a9a577 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1033,7 +1033,7 @@ function(process_llvm_pass_plugins) +@@ -1049,7 +1049,7 @@ function(process_llvm_pass_plugins) ## Part 1: Extension header to be included whenever we need extension # processing. @@ -76,11 +90,12 @@ index 29e40f45fef8..e9094e9b8eb2 100644 file(WRITE "${llvm_cmake_builddir}/LLVMConfigExtensions.cmake" diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt -index 51b6a4fdc284..a818de2e116c 100644 +index cea0c1df0a14..639c5422b04a 100644 --- a/llvm/cmake/modules/CMakeLists.txt +++ b/llvm/cmake/modules/CMakeLists.txt -@@ -1,6 +1,6 @@ +@@ -2,7 +2,7 @@ include(ExtendPath) include(LLVMDistributionSupport) + include(FindPrefixFromConfig) -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) +set(LLVM_INSTALL_PACKAGE_DIR share/llvm) @@ -88,10 +103,10 @@ index 51b6a4fdc284..a818de2e116c 100644 # First for users who use an installed LLVM, create the LLVMExports.cmake file. diff --git a/mlir/cmake/modules/CMakeLists.txt b/mlir/cmake/modules/CMakeLists.txt -index 65efc4a14987..7c3213ab0c2b 100644 +index d6703993bd74..e2f6cd3ea8cb 100644 --- a/mlir/cmake/modules/CMakeLists.txt +++ b/mlir/cmake/modules/CMakeLists.txt -@@ -3,11 +3,11 @@ include(LLVMDistributionSupport) +@@ -5,11 +5,11 @@ include(FindPrefixFromConfig) # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but # the usual CMake convention seems to be ${Project}Targets.cmake. @@ -105,34 +120,31 @@ index 65efc4a14987..7c3213ab0c2b 100644 set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") get_property(MLIR_EXPORTS GLOBAL PROPERTY MLIR_EXPORTS) +diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt +index 8e44a9c37cf1..f6edc7d77ffd 100644 +--- a/mlir/test/CMakeLists.txt ++++ b/mlir/test/CMakeLists.txt +@@ -8,7 +8,7 @@ endif() + # Passed to lit.site.cfg.py.so that the out of tree Standalone dialect test + # can find MLIR's CMake configuration + set(MLIR_CMAKE_DIR +- "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/mlir") ++ "${CMAKE_BINARY_DIR}/share/mlir") + + # Passed to lit.site.cfg.py.in to set up the path where to find the libraries + # for linalg integration tests. diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt -index 7cc129ba2e90..9776391cd535 100644 +index 7a0190b69df6..cdd3b4f126bb 100644 --- a/polly/cmake/CMakeLists.txt +++ b/polly/cmake/CMakeLists.txt -@@ -1,7 +1,7 @@ - # Keep this in sync with llvm/cmake/CMakeLists.txt! +@@ -3,8 +3,8 @@ + include(ExtendPath) + include(FindPrefixFromConfig) -set(LLVM_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") -set(POLLY_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/polly") -+set(LLVM_INSTALL_PACKAGE_DIR share/llvm) -+set(POLLY_INSTALL_PACKAGE_DIR share/polly) ++set(LLVM_INSTALL_PACKAGE_DIR "share/llvm") ++set(POLLY_INSTALL_PACKAGE_DIR "share/polly") if (CMAKE_CONFIGURATION_TYPES) set(POLLY_EXPORTS_FILE_NAME "PollyExports-$>.cmake") else() -diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt -index 8bea8843589b..3658c0a4414a 100644 ---- a/pstl/CMakeLists.txt -+++ b/pstl/CMakeLists.txt -@@ -81,10 +81,10 @@ install(TARGETS ParallelSTL - install(EXPORT ParallelSTLTargets - FILE ParallelSTLTargets.cmake - NAMESPACE pstl:: -- DESTINATION lib/cmake/ParallelSTL) -+ DESTINATION share/ParallelSTL) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfigVersion.cmake" -- DESTINATION lib/cmake/ParallelSTL) -+ DESTINATION share/ParallelSTL) - install(DIRECTORY include/ - DESTINATION include - PATTERN "*.in" EXCLUDE) diff --git a/ports/llvm/0003-fix-openmp-debug.patch b/ports/llvm/0003-fix-openmp-debug.patch deleted file mode 100644 index 3eff4fa538902a..00000000000000 --- a/ports/llvm/0003-fix-openmp-debug.patch +++ /dev/null @@ -1,25 +0,0 @@ - openmp/runtime/src/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt -index bdb867e352f7..16a13fa959ea 100644 ---- a/openmp/runtime/src/CMakeLists.txt -+++ b/openmp/runtime/src/CMakeLists.txt -@@ -159,7 +159,7 @@ else() - endif() - - set_target_properties(omp PROPERTIES -- PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}" -+ PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}" DEBUG_POSTFIX "" - LINK_FLAGS "${LIBOMP_CONFIGURED_LDFLAGS}" - LINKER_LANGUAGE ${LIBOMP_LINKER_LANGUAGE} - ) -@@ -236,7 +236,7 @@ if(WIN32) - # Create new import library that is just the previously created one + kmp_import.cpp - add_library(ompimp STATIC ${LIBOMP_GENERATED_IMP_LIB} kmp_import.cpp) - set_target_properties(ompimp PROPERTIES -- PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" -+ PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" DEBUG_POSTFIX "" - LINKER_LANGUAGE C - ) - add_dependencies(ompimp omp) # ensure generated import library is created first diff --git a/ports/llvm/0005-fix-tools-path.patch b/ports/llvm/0005-fix-tools-path.patch index 06fc8fc249ede7..1b1142ec9ef537 100644 --- a/ports/llvm/0005-fix-tools-path.patch +++ b/ports/llvm/0005-fix-tools-path.patch @@ -2,7 +2,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp -index 1a2f04552d13..9370c5e28206 100644 +index 8ed88f33ead4..3f2d1b98adcc 100644 --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -305,7 +305,7 @@ int main(int argc, char **argv) { diff --git a/ports/llvm/0007-fix-compiler-rt-install-path.patch b/ports/llvm/0007-fix-compiler-rt-install-path.patch index 6a585cd429da4a..c33dd996344cf8 100644 --- a/ports/llvm/0007-fix-compiler-rt-install-path.patch +++ b/ports/llvm/0007-fix-compiler-rt-install-path.patch @@ -4,10 +4,10 @@ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt -index 8131f6005dc2..9afef2e5a4e7 100644 +index 078988980c52..795f495b32d6 100644 --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt -@@ -222,7 +222,7 @@ set_target_properties(clang-resource-headers PROPERTIES +@@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES FOLDER "Misc" RUNTIME_OUTPUT_DIRECTORY "${output_dir}") @@ -17,10 +17,10 @@ index 8131f6005dc2..9afef2e5a4e7 100644 install( FILES ${files} ${generated_files} diff --git a/clang/runtime/CMakeLists.txt b/clang/runtime/CMakeLists.txt -index 61b1c60bf590..c20a5a326f15 100644 +index ca7e17927ee1..87d4282b36ad 100644 --- a/clang/runtime/CMakeLists.txt +++ b/clang/runtime/CMakeLists.txt -@@ -82,7 +82,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/) +@@ -84,7 +84,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/) -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} -DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION} -DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR} @@ -30,10 +30,10 @@ index 61b1c60bf590..c20a5a326f15 100644 -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake -index c11342e68813..61bb52135c43 100644 +index d7b0124f3546..55e515cb1c7a 100644 --- a/compiler-rt/cmake/base-config-ix.cmake +++ b/compiler-rt/cmake/base-config-ix.cmake -@@ -42,7 +42,7 @@ if (LLVM_TREE_AVAILABLE) +@@ -44,7 +44,7 @@ if (LLVM_TREE_AVAILABLE) # Setup the paths where compiler-rt runtimes and headers should be stored. set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}) set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) diff --git a/ports/llvm/0009-fix-tools-install-path.patch b/ports/llvm/0009-fix-tools-install-path.patch index bfc5c5fc2bb4b7..f71f9e02b67cf4 100644 --- a/ports/llvm/0009-fix-tools-install-path.patch +++ b/ports/llvm/0009-fix-tools-install-path.patch @@ -1,184 +1,27 @@ - clang-tools-extra/modularize/CMakeLists.txt | 2 +- - clang/cmake/modules/AddClang.cmake | 2 +- - clang/tools/c-index-test/CMakeLists.txt | 2 +- - clang/tools/clang-format/CMakeLists.txt | 2 +- - clang/tools/scan-build/CMakeLists.txt | 2 +- - clang/tools/scan-view/CMakeLists.txt | 2 +- - clang/utils/hmaptool/CMakeLists.txt | 2 +- - flang/cmake/modules/AddFlang.cmake | 2 +- - flang/tools/f18/CMakeLists.txt | 4 ++-- - flang/tools/flang-driver/CMakeLists.txt | 2 +- - lld/cmake/modules/AddLLD.cmake | 2 +- - lld/tools/lld/CMakeLists.txt | 2 +- - lldb/cmake/modules/AddLLDB.cmake | 2 +- - 13 files changed, 14 insertions(+), 14 deletions(-) + clang/tools/clang-linker-wrapper/CMakeLists.txt | 2 +- + lldb/cmake/modules/AddLLDB.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/clang-tools-extra/modularize/CMakeLists.txt b/clang-tools-extra/modularize/CMakeLists.txt -index 4caae81c49b6..8c459c51cc34 100644 ---- a/clang-tools-extra/modularize/CMakeLists.txt -+++ b/clang-tools-extra/modularize/CMakeLists.txt -@@ -23,5 +23,5 @@ clang_target_link_libraries(modularize +diff --git a/clang/tools/clang-linker-wrapper/CMakeLists.txt b/clang/tools/clang-linker-wrapper/CMakeLists.txt +index 1614f40fb60e..36c0bd838873 100644 +--- a/clang/tools/clang-linker-wrapper/CMakeLists.txt ++++ b/clang/tools/clang-linker-wrapper/CMakeLists.txt +@@ -37,4 +37,4 @@ target_link_libraries(clang-linker-wrapper + ${CLANG_LINKER_WRAPPER_LIB_DEPS} ) - install(TARGETS modularize -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION tools/llvm - COMPONENT clang-extras) -diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake -index 5752f4277444..00b7d21b8fef 100644 ---- a/clang/cmake/modules/AddClang.cmake -+++ b/clang/cmake/modules/AddClang.cmake -@@ -159,7 +159,7 @@ macro(add_clang_tool name) - get_target_export_arg(${name} Clang export_to_clangtargets) - install(TARGETS ${name} - ${export_to_clangtargets} -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION tools/llvm - COMPONENT ${name}) - - if(NOT LLVM_ENABLE_IDE) -diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt -index ceef4b08637c..ce6d7799475b 100644 ---- a/clang/tools/c-index-test/CMakeLists.txt -+++ b/clang/tools/c-index-test/CMakeLists.txt -@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH - "@executable_path/../../lib") - else() -- set(INSTALL_DESTINATION bin) -+ set(INSTALL_DESTINATION tools/llvm) - endif() - - install(TARGETS c-index-test -diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt -index 35ecdb11253c..d1b800dfdadc 100644 ---- a/clang/tools/clang-format/CMakeLists.txt -+++ b/clang/tools/clang-format/CMakeLists.txt -@@ -36,5 +36,5 @@ install(PROGRAMS clang-format.py - DESTINATION share/clang - COMPONENT clang-format) - install(PROGRAMS git-clang-format -- DESTINATION bin -+ DESTINATION tools/llvm - COMPONENT clang-format) -diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt -index ec0702d76f18..9a34a09921b1 100644 ---- a/clang/tools/scan-build/CMakeLists.txt -+++ b/clang/tools/scan-build/CMakeLists.txt -@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) - list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) - install(PROGRAMS bin/${BinFile} -- DESTINATION bin -+ DESTINATION tools/llvm - COMPONENT scan-build) - endforeach() - -diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt -index eccc6b83195b..232976c0c227 100644 ---- a/clang/tools/scan-view/CMakeLists.txt -+++ b/clang/tools/scan-view/CMakeLists.txt -@@ -20,7 +20,7 @@ if(CLANG_INSTALL_SCANVIEW) - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) - list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) - install(PROGRAMS bin/${BinFile} -- DESTINATION bin -+ DESTINATION tools/llvm - COMPONENT scan-view) - endforeach() - -diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt -index 62f2de0cb15c..38dc821c76de 100644 ---- a/clang/utils/hmaptool/CMakeLists.txt -+++ b/clang/utils/hmaptool/CMakeLists.txt -@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM - - list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) - install(PROGRAMS ${CLANG_HMAPTOOL} -- DESTINATION bin -+ DESTINATION tools/llvm - COMPONENT hmaptool) - - add_custom_target(hmaptool ALL DEPENDS ${Depends}) -diff --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake -index 5da58a59ed12..c019d7fc50a9 100644 ---- a/flang/cmake/modules/AddFlang.cmake -+++ b/flang/cmake/modules/AddFlang.cmake -@@ -108,7 +108,7 @@ macro(add_flang_tool name) - get_target_export_arg(${name} Flang export_to_flangtargets) - install(TARGETS ${name} - ${export_to_flangtargets} -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION tools/llvm - COMPONENT ${name}) - - if(NOT LLVM_ENABLE_IDE) -diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt -index 239859b5e5b9..12d00f904f8a 100644 ---- a/flang/tools/f18/CMakeLists.txt -+++ b/flang/tools/f18/CMakeLists.txt -@@ -60,7 +60,7 @@ endforeach() - - add_custom_target(module_files ALL DEPENDS ${MODULE_FILES}) - --install(TARGETS f18 DESTINATION bin) -+install(TARGETS f18 DESTINATION tools/llvm) - - set(FLANG_DEFAULT_DRIVER "flang-new") - if (NOT FLANG_BUILD_NEW_DRIVER) -@@ -70,5 +70,5 @@ endif() - # This flang shell script will only work in a POSIX shell. - if (NOT WIN32) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flang.in ${CMAKE_BINARY_DIR}/bin/flang @ONLY) -- install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION bin) -+ install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION tools/llvm) - endif() -diff --git a/flang/tools/flang-driver/CMakeLists.txt b/flang/tools/flang-driver/CMakeLists.txt -index 4c7ad220d223..f4206913e76f 100644 ---- a/flang/tools/flang-driver/CMakeLists.txt -+++ b/flang/tools/flang-driver/CMakeLists.txt -@@ -27,4 +27,4 @@ clang_target_link_libraries(flang-new - clangBasic - ) - --install(TARGETS flang-new DESTINATION bin) -+install(TARGETS flang-new DESTINATION tools/llvm) -diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake -index 9883475d1aa5..48e46586f387 100644 ---- a/lld/cmake/modules/AddLLD.cmake -+++ b/lld/cmake/modules/AddLLD.cmake -@@ -46,7 +46,7 @@ macro(add_lld_tool name) - get_target_export_arg(${name} LLD export_to_lldtargets) - install(TARGETS ${name} - ${export_to_lldtargets} -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION tools/llvm - COMPONENT ${name}) - - if(NOT CMAKE_CONFIGURATION_TYPES) -diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt -index e77b2161a873..b325b934640c 100644 ---- a/lld/tools/lld/CMakeLists.txt -+++ b/lld/tools/lld/CMakeLists.txt -@@ -21,7 +21,7 @@ target_link_libraries(lld - ) - - install(TARGETS lld -- RUNTIME DESTINATION bin) -+ RUNTIME DESTINATION tools/llvm) - - if(NOT LLD_SYMLINKS_TO_CREATE) - set(LLD_SYMLINKS_TO_CREATE +-install(TARGETS clang-linker-wrapper RUNTIME DESTINATION bin) ++install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake -index 8be214a8509a..4a5d0fa39be3 100644 +index 3291a7c808e1..9fb3ecba7c82 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake -@@ -187,7 +187,7 @@ function(add_lldb_executable name) +@@ -189,7 +189,7 @@ function(add_lldb_executable name) endif() if(ARG_GENERATE_INSTALL) - set(install_dest bin) -+ set(install_dest tools/llvm) ++ set(install_dest "${CMAKE_INSTALL_BINDIR}") if(ARG_INSTALL_PREFIX) set(install_dest ${ARG_INSTALL_PREFIX}) endif() diff --git a/ports/llvm/0010-fix-libffi.patch b/ports/llvm/0010-fix-libffi.patch index 93d0cb4da4d421..3859b81fecb8bd 100644 --- a/ports/llvm/0010-fix-libffi.patch +++ b/ports/llvm/0010-fix-libffi.patch @@ -1,16 +1,16 @@ - llvm/cmake/config-ix.cmake | 2 +- + llvm/cmake/modules/FindFFI.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake -index dd0aaadb47c7..279435b5b27d 100644 ---- a/llvm/cmake/config-ix.cmake -+++ b/llvm/cmake/config-ix.cmake -@@ -343,7 +343,7 @@ if( LLVM_ENABLE_FFI ) - message(FATAL_ERROR "libffi includes are not found.") +diff --git a/llvm/cmake/modules/FindFFI.cmake b/llvm/cmake/modules/FindFFI.cmake +index b0d859af8959..a756d0c8fdb0 100644 +--- a/llvm/cmake/modules/FindFFI.cmake ++++ b/llvm/cmake/modules/FindFFI.cmake +@@ -34,7 +34,7 @@ else() endif() + endif() -- find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) -+ find_library(FFI_LIBRARY_PATH NAMES ffi libffi PATHS ${FFI_LIBRARY_DIR}) - if( NOT FFI_LIBRARY_PATH ) - message(FATAL_ERROR "libffi is not found.") - endif() +-find_library(FFI_LIBRARIES ffi PATHS ${FFI_LIBRARY_DIR}) ++find_library(FFI_LIBRARIES ffi libffi PATHS ${FFI_LIBRARY_DIR}) + + if(FFI_LIBRARIES) + include(CMakePushCheckState) diff --git a/ports/llvm/0011-fix-libxml2.patch b/ports/llvm/0011-fix-libxml2.patch deleted file mode 100644 index d3f953f320df6b..00000000000000 --- a/ports/llvm/0011-fix-libxml2.patch +++ /dev/null @@ -1,34 +0,0 @@ - clang/tools/c-index-test/CMakeLists.txt | 6 +----- - lldb/cmake/modules/LLDBConfig.cmake | 2 +- - 2 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt -index ceef4b08637c..40b9e995597f 100644 ---- a/clang/tools/c-index-test/CMakeLists.txt -+++ b/clang/tools/c-index-test/CMakeLists.txt -@@ -40,11 +40,7 @@ set_target_properties(c-index-test - - # If libxml2 is available, make it available for c-index-test. - if (CLANG_HAVE_LIBXML) -- if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})) -- include_directories(SYSTEM ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR}) -- else() -- include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) -- endif() -+ include_directories(SYSTEM ${LIBXML2_INCLUDE_DIRS}) - target_link_libraries(c-index-test PRIVATE ${LIBXML2_LIBRARIES}) - endif() - -diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake -index b62cd7d24438..a8c78ee1bccd 100644 ---- a/lldb/cmake/modules/LLDBConfig.cmake -+++ b/lldb/cmake/modules/LLDBConfig.cmake -@@ -215,7 +215,7 @@ if (LLDB_ENABLE_LZMA) - endif() - - if (LLDB_ENABLE_LIBXML2) -- include_directories(${LIBXML2_INCLUDE_DIR}) -+ include_directories(${LIBXML2_INCLUDE_DIRS}) - endif() - - include_directories(BEFORE diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 205d250396b6cb..b34e04e60cfa3f 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,4 +1,4 @@ -set(LLVM_VERSION "13.0.0") +set(LLVM_VERSION "14.0.0") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -6,17 +6,15 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llvm/llvm-project REF llvmorg-${LLVM_VERSION} - SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 + SHA512 eb5acf96b5e2c59bd07579f7ebe73018b0dd6e2f2d9a5a3c7986320e88febd837d1084b9e5313a2264310342193044629d228337cc76dd2b8527dc0a8bdda999 HEAD_REF master PATCHES 0002-fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc. - 0003-fix-openmp-debug.patch 0004-fix-dr-1734.patch 0005-fix-tools-path.patch 0007-fix-compiler-rt-install-path.patch 0009-fix-tools-install-path.patch 0010-fix-libffi.patch - 0011-fix-libxml2.patch ) vcpkg_check_features( @@ -90,6 +88,9 @@ elseif("disable-abi-breaking-checks" IN_LIST FEATURES) endif() set(LLVM_ENABLE_PROJECTS) +if("bolt" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "bolt") +endif() if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "clang") if("disable-clang-static-analyzer" IN_LIST FEATURES) @@ -100,7 +101,7 @@ if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES) -DCLANG_ENABLE_STATIC_ANALYZER=OFF ) endif() - # 1) LLVM/Clang tools are relocated from ./bin/ to ./tools/llvm/ (LLVM_TOOLS_INSTALL_DIR=tools/llvm) + # 1) LLVM/Clang binaries are relocated from ./bin/ to ./tools/llvm/ (CMAKE_INSTALL_BINDIR=tools/llvm) # 2) Clang resource files are relocated from ./lib/clang/ to ./tools/llvm/lib/clang/ (see patch 0007-fix-compiler-rt-install-path.patch) # So, the relative path should be changed from ../lib/clang/ to ./lib/clang/ list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=lib/clang/${LLVM_VERSION}) @@ -124,26 +125,14 @@ endif() if("libclc" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "libclc") endif() -if("libcxx" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "Building libcxx with MSVC is not supported. Disable it until issues are fixed.") - endif() - list(APPEND LLVM_ENABLE_PROJECTS "libcxx") -endif() -if("libcxxabi" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "Building libcxxabi with MSVC is not supported. Disable it until issues are fixed.") - endif() - list(APPEND LLVM_ENABLE_PROJECTS "libcxxabi") -endif() -if("libunwind" IN_LIST FEATURES) - list(APPEND LLVM_ENABLE_PROJECTS "libunwind") -endif() if("lld" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "lld") endif() if("lldb" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "lldb") + list(APPEND FEATURE_OPTIONS + -DLLDB_ENABLE_CURSES=OFF + ) endif() if("mlir" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "mlir") @@ -164,9 +153,6 @@ if("openmp" IN_LIST FEATURES) ) endif() endif() -if("parallel-libs" IN_LIST FEATURES) - list(APPEND LLVM_ENABLE_PROJECTS "parallel-libs") -endif() if("polly" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "polly") endif() @@ -177,6 +163,23 @@ if("pstl" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "pstl") endif() +set(LLVM_ENABLE_RUNTIMES) +if("libcxx" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building libcxx with MSVC is not supported, as cl doesn't support the #include_next extension.") + endif() + list(APPEND LLVM_ENABLE_RUNTIMES "libcxx") +endif() +if("libcxxabi" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building libcxxabi with MSVC is not supported. Disable it until issues are fixed.") + endif() + list(APPEND LLVM_ENABLE_RUNTIMES "libcxxabi") +endif() +if("libunwind" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_RUNTIMES "libunwind") +endif() + set(known_llvm_targets AArch64 AMDGPU @@ -192,6 +195,7 @@ set(known_llvm_targets RISCV Sparc SystemZ + VE WebAssembly X86 XCore @@ -243,20 +247,18 @@ vcpkg_cmake_configure( -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_BUILD_TESTS=OFF - -DLLDB_ENABLE_CURSES=OFF + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_BUILD_BENCHMARKS=OFF # Force TableGen to be built with optimization. This will significantly improve build time. -DLLVM_OPTIMIZED_TABLEGEN=ON "-DLLVM_ENABLE_PROJECTS=${LLVM_ENABLE_PROJECTS}" + "-DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES}" "-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD}" -DPACKAGE_VERSION=${LLVM_VERSION} # Limit the maximum number of concurrent link jobs to 1. This should fix low amount of memory issue for link. -DLLVM_PARALLEL_LINK_JOBS=1 - # Disable build LLVM-C.dll (Windows only) due to doesn't compile with CMAKE_DEBUG_POSTFIX - -DLLVM_BUILD_LLVM_C_DYLIB=OFF # Path for binary subdirectory (defaults to 'bin') - -DLLVM_TOOLS_INSTALL_DIR=tools/llvm - OPTIONS_DEBUG - -DCMAKE_DEBUG_POSTFIX=d + -DCMAKE_INSTALL_BINDIR=tools/${PORT} ) vcpkg_cmake_install(ADD_BIN_TO_PATH) @@ -321,9 +323,11 @@ endif() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/tools" + ) endif() # LLVM still generates a few DLLs in the static build: diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 29be0e7bb0924d..75fac1bcc8f76a 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -1,7 +1,6 @@ { "name": "llvm", - "version": "13.0.0", - "port-version": 3, + "version": "14.0.0", "description": "The LLVM Compiler Infrastructure.", "homepage": "https://llvm.org", "license": "Apache-2.0", @@ -24,6 +23,18 @@ "tools" ], "features": { + "bolt": { + "description": "BOLT is a post-link optimizer developed to speed up large applications.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "tools" + ] + } + ] + }, "clang": { "description": "Include C Language Family Front-end.", "dependencies": [ @@ -238,9 +249,6 @@ } ] }, - "parallel-libs": { - "description": "Include parallel-libs project." - }, "polly": { "description": "Include Polly (Polyhedral optimizations for LLVM) project.", "dependencies": [ @@ -281,6 +289,7 @@ "target-riscv", "target-sparc", "target-systemz", + "target-ve", "target-webassembly", "target-x86", "target-xcore" @@ -327,6 +336,9 @@ "target-systemz": { "description": "Build with SystemZ backend." }, + "target-ve": { + "description": "Build with VE backend." + }, "target-webassembly": { "description": "Build with WebAssembly backend." }, From bebbf1e66b2b125436ebc341394e153696fb364e Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sat, 2 Apr 2022 18:17:45 +0300 Subject: [PATCH 02/23] [llvm] BOLT sub-project support --- ports/llvm/0011-fix-install-bolt.patch | 22 +++++++++++++++++++++ ports/llvm/portfile.cmake | 7 ++++--- scripts/test_ports/vcpkg-ci-llvm/vcpkg.json | 1 + 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 ports/llvm/0011-fix-install-bolt.patch diff --git a/ports/llvm/0011-fix-install-bolt.patch b/ports/llvm/0011-fix-install-bolt.patch new file mode 100644 index 00000000000000..1e2660fa93c178 --- /dev/null +++ b/ports/llvm/0011-fix-install-bolt.patch @@ -0,0 +1,22 @@ + bolt/tools/driver/CMakeLists.txt | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/bolt/tools/driver/CMakeLists.txt b/bolt/tools/driver/CMakeLists.txt +index d50781615663..df06604c724c 100644 +--- a/bolt/tools/driver/CMakeLists.txt ++++ b/bolt/tools/driver/CMakeLists.txt +@@ -33,14 +33,6 @@ set(BOLT_DEPENDS + ) + + add_custom_target(bolt DEPENDS ${BOLT_DEPENDS}) +-install(PROGRAMS +- ${CMAKE_BINARY_DIR}/bin/llvm-bolt +- ${CMAKE_BINARY_DIR}/bin/perf2bolt +- ${CMAKE_BINARY_DIR}/bin/llvm-boltdiff +- ${CMAKE_BINARY_DIR}/bin/llvm-bolt-heatmap +- DESTINATION ${CMAKE_INSTALL_BINDIR} +- COMPONENT bolt +- ) + add_llvm_install_targets(install-bolt DEPENDS bolt COMPONENT bolt) + set_target_properties(bolt PROPERTIES FOLDER "BOLT") + set_target_properties(install-bolt PROPERTIES FOLDER "BOLT") diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index b34e04e60cfa3f..b12daed1706a6e 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_from_github( 0007-fix-compiler-rt-install-path.patch 0009-fix-tools-install-path.patch 0010-fix-libffi.patch + 0011-fix-install-bolt.patch ) vcpkg_check_features( @@ -101,7 +102,7 @@ if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES) -DCLANG_ENABLE_STATIC_ANALYZER=OFF ) endif() - # 1) LLVM/Clang binaries are relocated from ./bin/ to ./tools/llvm/ (CMAKE_INSTALL_BINDIR=tools/llvm) + # 1) LLVM/Clang tools are relocated from ./bin/ to ./tools/llvm/ (LLVM_TOOLS_INSTALL_DIR=tools/llvm) # 2) Clang resource files are relocated from ./lib/clang/ to ./tools/llvm/lib/clang/ (see patch 0007-fix-compiler-rt-install-path.patch) # So, the relative path should be changed from ../lib/clang/ to ./lib/clang/ list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=lib/clang/${LLVM_VERSION}) @@ -257,8 +258,7 @@ vcpkg_cmake_configure( -DPACKAGE_VERSION=${LLVM_VERSION} # Limit the maximum number of concurrent link jobs to 1. This should fix low amount of memory issue for link. -DLLVM_PARALLEL_LINK_JOBS=1 - # Path for binary subdirectory (defaults to 'bin') - -DCMAKE_INSTALL_BINDIR=tools/${PORT} + -DLLVM_TOOLS_INSTALL_DIR=tools/llvm ) vcpkg_cmake_install(ADD_BIN_TO_PATH) @@ -331,6 +331,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") endif() # LLVM still generates a few DLLs in the static build: +# * LLVM-C.dll # * libclang.dll # * LTO.dll # * Remarks.dll diff --git a/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json b/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json index d04286b65641d6..b96c47e00fec1c 100644 --- a/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json @@ -8,6 +8,7 @@ "name": "llvm", "default-features": false, "features": [ + "bolt", "clang", "enable-abi-breaking-checks", "disable-assertions", From 519ab3a92a856905c089cf9c077403b43559933a Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sun, 10 Apr 2022 21:42:25 +0300 Subject: [PATCH 03/23] [llvm] fix tools install paths --- ports/llvm/0009-fix-tools-install-path.patch | 220 ++++++++++++++++++- ports/llvm/portfile.cmake | 3 +- 2 files changed, 214 insertions(+), 9 deletions(-) diff --git a/ports/llvm/0009-fix-tools-install-path.patch b/ports/llvm/0009-fix-tools-install-path.patch index f71f9e02b67cf4..294de6fdabbd70 100644 --- a/ports/llvm/0009-fix-tools-install-path.patch +++ b/ports/llvm/0009-fix-tools-install-path.patch @@ -1,9 +1,84 @@ - clang/tools/clang-linker-wrapper/CMakeLists.txt | 2 +- - lldb/cmake/modules/AddLLDB.cmake | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + clang-tools-extra/clang-tidy/tool/CMakeLists.txt | 2 +- + clang-tools-extra/modularize/CMakeLists.txt | 2 +- + clang/cmake/modules/AddClang.cmake | 2 +- + clang/tools/c-index-test/CMakeLists.txt | 2 +- + clang/tools/clang-format/CMakeLists.txt | 2 +- + clang/tools/clang-linker-wrapper/CMakeLists.txt | 2 +- + clang/tools/clang-nvlink-wrapper/CMakeLists.txt | 2 +- + clang/tools/scan-build-py/CMakeLists.txt | 4 ++-- + clang/tools/scan-build/CMakeLists.txt | 2 +- + clang/tools/scan-view/CMakeLists.txt | 2 +- + clang/utils/hmaptool/CMakeLists.txt | 2 +- + flang/cmake/modules/AddFlang.cmake | 2 +- + flang/tools/f18/CMakeLists.txt | 2 +- + flang/tools/flang-driver/CMakeLists.txt | 2 +- + lld/cmake/modules/AddLLD.cmake | 2 +- + lld/tools/lld/CMakeLists.txt | 2 +- + lldb/cmake/modules/AddLLDB.cmake | 2 +- + 17 files changed, 18 insertions(+), 18 deletions(-) +diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt +index 3ce552872015..e09b917ae5f8 100644 +--- a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt ++++ b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt +@@ -64,6 +64,6 @@ install(PROGRAMS clang-tidy-diff.py + DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" + COMPONENT clang-tidy) + install(PROGRAMS run-clang-tidy.py +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT clang-tidy + RENAME run-clang-tidy) +diff --git a/clang-tools-extra/modularize/CMakeLists.txt b/clang-tools-extra/modularize/CMakeLists.txt +index fb17e353c39f..4b409e47446a 100644 +--- a/clang-tools-extra/modularize/CMakeLists.txt ++++ b/clang-tools-extra/modularize/CMakeLists.txt +@@ -23,5 +23,5 @@ clang_target_link_libraries(modularize + ) + + install(TARGETS modularize +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT clang-extras) +diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake +index 9bbbfc032b7d..bd238ff249cd 100644 +--- a/clang/cmake/modules/AddClang.cmake ++++ b/clang/cmake/modules/AddClang.cmake +@@ -160,7 +160,7 @@ macro(add_clang_tool name) + get_target_export_arg(${name} Clang export_to_clangtargets) + install(TARGETS ${name} + ${export_to_clangtargets} +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT ${name}) + + if(NOT LLVM_ENABLE_IDE) +diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt +index 0ae1b4e55244..e8a34e136194 100644 +--- a/clang/tools/c-index-test/CMakeLists.txt ++++ b/clang/tools/c-index-test/CMakeLists.txt +@@ -49,7 +49,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH + "@executable_path/../../lib") + else() +- set(INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ set(INSTALL_DESTINATION "${LLVM_TOOLS_INSTALL_DIR}") + endif() + + install(TARGETS c-index-test +diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt +index bbdef93b576b..8744e414da0a 100644 +--- a/clang/tools/clang-format/CMakeLists.txt ++++ b/clang/tools/clang-format/CMakeLists.txt +@@ -36,5 +36,5 @@ install(PROGRAMS clang-format.py + DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" + COMPONENT clang-format) + install(PROGRAMS git-clang-format +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT clang-format) diff --git a/clang/tools/clang-linker-wrapper/CMakeLists.txt b/clang/tools/clang-linker-wrapper/CMakeLists.txt -index 1614f40fb60e..36c0bd838873 100644 +index 1614f40fb60e..0e78982310c7 100644 --- a/clang/tools/clang-linker-wrapper/CMakeLists.txt +++ b/clang/tools/clang-linker-wrapper/CMakeLists.txt @@ -37,4 +37,4 @@ target_link_libraries(clang-linker-wrapper @@ -11,9 +86,140 @@ index 1614f40fb60e..36c0bd838873 100644 ) -install(TARGETS clang-linker-wrapper RUNTIME DESTINATION bin) -+install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}") +diff --git a/clang/tools/clang-nvlink-wrapper/CMakeLists.txt b/clang/tools/clang-nvlink-wrapper/CMakeLists.txt +index 2c979e509795..f22b801fe19a 100644 +--- a/clang/tools/clang-nvlink-wrapper/CMakeLists.txt ++++ b/clang/tools/clang-nvlink-wrapper/CMakeLists.txt +@@ -22,4 +22,4 @@ target_link_libraries(clang-nvlink-wrapper + ${CLANG_NVLINK_WRAPPER_LIB_DEPS} + ) + +-install(TARGETS clang-nvlink-wrapper RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++install(TARGETS clang-nvlink-wrapper RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}") +diff --git a/clang/tools/scan-build-py/CMakeLists.txt b/clang/tools/scan-build-py/CMakeLists.txt +index 061dc7ef4dd9..91499600693b 100644 +--- a/clang/tools/scan-build-py/CMakeLists.txt ++++ b/clang/tools/scan-build-py/CMakeLists.txt +@@ -43,7 +43,7 @@ foreach(BinFile ${BinFiles}) + ${CMAKE_BINARY_DIR}/bin/scan-build-py + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/scan-build) + install (PROGRAMS "bin/scan-build" +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + RENAME scan-build-py + COMPONENT scan-build-py) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/scan-build-py) +@@ -56,7 +56,7 @@ foreach(BinFile ${BinFiles}) + ${CMAKE_BINARY_DIR}/bin/ + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT scan-build-py) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + endif() +diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt +index 4a578b4c6f3e..05574a4919f6 100644 +--- a/clang/tools/scan-build/CMakeLists.txt ++++ b/clang/tools/scan-build/CMakeLists.txt +@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT scan-build) + endforeach() + +diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt +index 07aec76ee66f..ca6a3380ad0c 100644 +--- a/clang/tools/scan-view/CMakeLists.txt ++++ b/clang/tools/scan-view/CMakeLists.txt +@@ -20,7 +20,7 @@ if(CLANG_INSTALL_SCANVIEW) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT scan-view) + endforeach() + +diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt +index f0d9866782b8..5fcdfc04425f 100644 +--- a/clang/utils/hmaptool/CMakeLists.txt ++++ b/clang/utils/hmaptool/CMakeLists.txt +@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM + + list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) + install(PROGRAMS ${CLANG_HMAPTOOL} +- DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT hmaptool) + + add_custom_target(hmaptool ALL DEPENDS ${Depends}) +diff --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake +index 369e303e148a..3c3697c07406 100644 +--- a/flang/cmake/modules/AddFlang.cmake ++++ b/flang/cmake/modules/AddFlang.cmake +@@ -109,7 +109,7 @@ macro(add_flang_tool name) + get_target_export_arg(${name} Flang export_to_flangtargets) + install(TARGETS ${name} + ${export_to_flangtargets} +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT ${name}) + + if(NOT LLVM_ENABLE_IDE) +diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt +index aa77676c6229..dd15b0b7727b 100644 +--- a/flang/tools/f18/CMakeLists.txt ++++ b/flang/tools/f18/CMakeLists.txt +@@ -50,5 +50,5 @@ if (NOT WIN32) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/flang + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang ${CMAKE_BINARY_DIR}/bin) + add_custom_target(flang ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang) +- install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${LLVM_TOOLS_INSTALL_DIR}") + endif() +diff --git a/flang/tools/flang-driver/CMakeLists.txt b/flang/tools/flang-driver/CMakeLists.txt +index b3e90746e786..b327e69aaeaa 100644 +--- a/flang/tools/flang-driver/CMakeLists.txt ++++ b/flang/tools/flang-driver/CMakeLists.txt +@@ -34,4 +34,4 @@ if(FLANG_PLUGIN_SUPPORT) + export_executable_symbols_for_plugins(flang-new) + endif() + +-install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}") ++install(TARGETS flang-new DESTINATION "${LLVM_TOOLS_INSTALL_DIR}") +diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake +index dd2898ce6236..86560bddd5e4 100644 +--- a/lld/cmake/modules/AddLLD.cmake ++++ b/lld/cmake/modules/AddLLD.cmake +@@ -47,7 +47,7 @@ macro(add_lld_tool name) + get_target_export_arg(${name} LLD export_to_lldtargets) + install(TARGETS ${name} + ${export_to_lldtargets} +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + COMPONENT ${name}) + + if(NOT CMAKE_CONFIGURATION_TYPES) +diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt +index df48cc0d6c51..1363144fd8e1 100644 +--- a/lld/tools/lld/CMakeLists.txt ++++ b/lld/tools/lld/CMakeLists.txt +@@ -20,7 +20,7 @@ target_link_libraries(lld + ) + + install(TARGETS lld +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}") + + if(NOT LLD_SYMLINKS_TO_CREATE) + set(LLD_SYMLINKS_TO_CREATE diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake -index 3291a7c808e1..9fb3ecba7c82 100644 +index 3291a7c808e1..9fe9b9a7940d 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -189,7 +189,7 @@ function(add_lldb_executable name) @@ -21,7 +227,7 @@ index 3291a7c808e1..9fb3ecba7c82 100644 if(ARG_GENERATE_INSTALL) - set(install_dest bin) -+ set(install_dest "${CMAKE_INSTALL_BINDIR}") ++ set(install_dest "${LLVM_TOOLS_INSTALL_DIR}") if(ARG_INSTALL_PREFIX) set(install_dest ${ARG_INSTALL_PREFIX}) endif() diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index b12daed1706a6e..603a3ab7c4ab95 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -323,8 +323,7 @@ endif() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" - "${CURRENT_PACKAGES_DIR}/debug/include" + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/tools" ) From f840b0a31cc721ccdbf04f8e09d1bab816a700b0 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sun, 10 Apr 2022 22:43:20 +0300 Subject: [PATCH 04/23] [halide] update to v14.0.0 --- ports/halide/portfile.cmake | 6 +++--- ports/halide/vcpkg.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/halide/portfile.cmake b/ports/halide/portfile.cmake index 1b7dea6d572c5f..c5fcb86a119c7a 100644 --- a/ports/halide/portfile.cmake +++ b/ports/halide/portfile.cmake @@ -1,13 +1,13 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -set(HALIDE_VERSION_TAG v13.0.2) +set(HALIDE_VERSION_TAG v14.0.0) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO halide/Halide REF ${HALIDE_VERSION_TAG} - SHA512 d2b19934ff0d759d302428f61e4075306f79c29cc1cd8802dc1ac5f325434034e0f430c435610e58f862b87cc8ef34ddcc3d0588947eeb8e1387d0bf31b9c008 - HEAD_REF release/13.x + SHA512 c7b1186cca545f30d038f1e9bb28ca7231023869d191c50722213da4c7e9adfd4a53129fe395cd7938cb7cb3fb1bf80f9cd3b4b8473a0246f15b9ad8d3e40fe2 + HEAD_REF release/14.x ) vcpkg_check_features( diff --git a/ports/halide/vcpkg.json b/ports/halide/vcpkg.json index 4e54393fe62d91..d24aa98e05dab4 100644 --- a/ports/halide/vcpkg.json +++ b/ports/halide/vcpkg.json @@ -1,6 +1,6 @@ { "name": "halide", - "version": "13.0.2", + "version": "14.0.0", "description": "Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.", "homepage": "https://github.com/halide/Halide", "supports": "!uwp", From 09a95d4a63545e854ec2ce3137df8876283a54e3 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sun, 10 Apr 2022 22:44:29 +0300 Subject: [PATCH 05/23] update versions --- versions/baseline.json | 6 +++--- versions/h-/halide.json | 5 +++++ versions/l-/llvm.json | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index c7016f8bad5366..1dfa4c2ab4af1e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2705,7 +2705,7 @@ "port-version": 1 }, "halide": { - "baseline": "13.0.2", + "baseline": "14.0.0", "port-version": 0 }, "happly": { @@ -4245,8 +4245,8 @@ "port-version": 2 }, "llvm": { - "baseline": "13.0.0", - "port-version": 3 + "baseline": "14.0.0", + "port-version": 0 }, "lmdb": { "baseline": "0.9.24", diff --git a/versions/h-/halide.json b/versions/h-/halide.json index c313ea05b6b22d..c0d638418e5da4 100644 --- a/versions/h-/halide.json +++ b/versions/h-/halide.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8beaf9e4b505e3a59e286d220492de1af4381154", + "version": "14.0.0", + "port-version": 0 + }, { "git-tree": "92aa2ed7a51a38dfb53cdcb2f4b9c54f58030d52", "version": "13.0.2", diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index ee0a089ff7ab9a..395ae7fdf0396e 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8c220c7be02e52574340283dcecfb77c2fbada48", + "version": "14.0.0", + "port-version": 0 + }, { "git-tree": "15418b7e938058677963d920b616403240eca37f", "version": "13.0.0", From ed4df5ceee3d45af97c3d027a7238e48b607eb61 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Thu, 14 Apr 2022 00:40:02 +0300 Subject: [PATCH 06/23] [vcpkg-get-python-packages] fix "LOGNAME should be specified" warning --- ports/vcpkg-get-python-packages/vcpkg.json | 2 +- .../x_vcpkg_get_python_packages.cmake | 21 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ports/vcpkg-get-python-packages/vcpkg.json b/ports/vcpkg-get-python-packages/vcpkg.json index 36e86bb1b330b2..b3b3b7ef8f5acd 100644 --- a/ports/vcpkg-get-python-packages/vcpkg.json +++ b/ports/vcpkg-get-python-packages/vcpkg.json @@ -1,6 +1,6 @@ { "name": "vcpkg-get-python-packages", - "version-date": "2022-02-12", + "version-date": "2022-04-14", "license": "MIT", "supports": "native" } diff --git a/ports/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake b/ports/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake index c13019651e6a41..98a707e6f19720 100644 --- a/ports/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake +++ b/ports/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake @@ -46,17 +46,26 @@ function(x_vcpkg_get_python_packages) REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25 SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a ) - vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}") + vcpkg_execute_required_process( + COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + LOGNAME execute-python-get-pip + ) endif() foreach(_package IN LISTS arg_PACKAGES) - vcpkg_execute_required_process(COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}") + vcpkg_execute_required_process( + COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + LOGNAME execute-python-install-${_package} + ) endforeach() else() foreach(_package IN LISTS arg_PACKAGES) - vcpkg_execute_required_process(COMMAND "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package} - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}") + vcpkg_execute_required_process( + COMMAND "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + LOGNAME execute-easy_install-${_package} + ) endforeach() endif() else() # outside vcpkg From 873e340e0a88d4a0321f854205f124cb28aec943 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Thu, 14 Apr 2022 00:46:02 +0300 Subject: [PATCH 07/23] [mesa] update to v22.0.1 --- ports/mesa/clang.patch | 52 + ports/mesa/clover.patch | 63 + ports/mesa/d3d10sw.patch | 383 --- ports/mesa/def-fixes.patch | 3419 +++++++++++++++++++ ports/mesa/portfile.cmake | 43 +- ports/mesa/radv-msvc-llvm13-2.patch | 14 - ports/mesa/swr-llvm13.patch | 334 -- ports/mesa/swr-msvc-2.patch | 57 - ports/mesa/swravx512-post-static-link.patch | 22 - ports/mesa/vcpkg.json | 3 +- 10 files changed, 3548 insertions(+), 842 deletions(-) create mode 100644 ports/mesa/clang.patch create mode 100644 ports/mesa/clover.patch delete mode 100644 ports/mesa/d3d10sw.patch create mode 100644 ports/mesa/def-fixes.patch delete mode 100644 ports/mesa/radv-msvc-llvm13-2.patch delete mode 100644 ports/mesa/swr-llvm13.patch delete mode 100644 ports/mesa/swr-msvc-2.patch delete mode 100644 ports/mesa/swravx512-post-static-link.patch diff --git a/ports/mesa/clang.patch b/ports/mesa/clang.patch new file mode 100644 index 00000000000000..b8c7b547af1bdd --- /dev/null +++ b/ports/mesa/clang.patch @@ -0,0 +1,52 @@ +diff --git a/meson.build b/meson.build +index 53ec2c2ef95e65447dd0f0eb65c0f92a5906590d..c124b5fb0d2b28424f33aac54cd4f87c4249dc40 100644 +--- a/meson.build ++++ b/meson.build +@@ -1087,7 +1087,18 @@ elif host_machine.system() == 'windows' + '-DNOMINMAX', + ] + else +- pre_args += ['-D__MSVCRT_VERSION__=0x0700'] ++ # When the target is not mingw/ucrt ++ # NOTE: clang's stddef.h are conflict with mingw/ucrt's stddef.h ++ # So do not include headers that defined in clang for detecting ++ # _UCRT ++ if cc.compiles(''' ++ #include ++ #if defined(__MINGW32__) && defined(_UCRT) ++ #error ++ #endif ++ int main(void) { return 0; }''') ++ pre_args += ['-D__MSVCRT_VERSION__=0x0700'] ++ endif + endif + elif host_machine.system() == 'openbsd' + pre_args += '-D_ISOC11_SOURCE' +diff --git a/src/compiler/nir/nir_lower_atomics_to_ssbo.c b/src/compiler/nir/nir_lower_atomics_to_ssbo.c +index c1799d0b9d0af70148928a4b224172c188c64194..448f63bdc7cc3b9cae123e3c0abe79b4b5af380b 100644 +--- a/src/compiler/nir/nir_lower_atomics_to_ssbo.c ++++ b/src/compiler/nir/nir_lower_atomics_to_ssbo.c +@@ -27,10 +27,6 @@ + #include "nir.h" + #include "nir_builder.h" + +-#if defined(_WIN32) && !defined(snprintf) +-#define snprintf _snprintf +-#endif +- + /* + * Remap atomic counters to SSBOs, starting from the shader's next SSBO slot + * (info.num_ssbos). +diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h +index b1b40c8ee992eaeea985c58f4e8923724c1d385b..6053c2544a2628300cc8dc3311c8e4f0f69d36d5 100644 +--- a/src/compiler/spirv/vtn_private.h ++++ b/src/compiler/spirv/vtn_private.h +@@ -41,7 +41,7 @@ struct vtn_builder; + struct vtn_decoration; + + /* setjmp/longjmp is broken on MinGW: https://sourceforge.net/p/mingw-w64/bugs/406/ */ +-#ifdef __MINGW32__ ++#if defined(__MINGW32__) && !defined(_UCRT) + #define vtn_setjmp __builtin_setjmp + #define vtn_longjmp __builtin_longjmp + #else diff --git a/ports/mesa/clover.patch b/ports/mesa/clover.patch new file mode 100644 index 00000000000000..6e39e180fe6075 --- /dev/null +++ b/ports/mesa/clover.patch @@ -0,0 +1,63 @@ +From b7c465dc43693cb1ad7e073cc7d8f89f5cfbd0ac Mon Sep 17 00:00:00 2001 +From: pal1000 +Date: Sat, 13 Nov 2021 11:39:58 +0200 +Subject: [PATCH] clover: Use static pipe loader on Windows + +Currently this only supports linking in swrast, but more Windows-supporting +drivers can be added pretty easily. +--- + src/gallium/targets/opencl/meson.build | 18 +++++++++++++++--- + src/gallium/targets/opencl/target.c | 2 ++ + 2 files changed, 17 insertions(+), 3 deletions(-) + create mode 100644 src/gallium/targets/opencl/target.c + +diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build +index ec65fcbe18e..f6ca4a28f20 100644 +--- a/src/gallium/targets/opencl/meson.build ++++ b/src/gallium/targets/opencl/meson.build +@@ -85,19 +85,31 @@ if not (dep_clang.found() and dep_clang_usable) + endif + endif + ++if host_machine.system() == 'windows' ++ libpipe_loader = libpipe_loader_static ++ target_files = ['target.c'] ++else ++ libpipe_loader = libpipe_loader_dynamic ++ target_files = [] ++endif ++ + ocldef = files(opencl_libname + '.def')[0] + + libopencl = shared_library( + opencl_libname, +- [], ++ target_files, ++ include_directories : [ ++ inc_include, inc_util, inc_src, inc_gallium, inc_gallium_winsys, inc_gallium_drivers, inc_gallium_aux ++ ], + vs_module_defs : ocldef, + link_args : [ld_args_gc_sections, opencl_link_args], + link_depends : opencl_link_deps, + link_whole : libclover, +- link_with : [libpipe_loader_dynamic, libgallium], ++ link_with : [libpipe_loader, libgallium, libws_null, libwsw], + dependencies : [ + idep_mesautil, +- dep_clock, dep_dl, dep_unwind, dep_elf, dep_clang, dep_version ++ dep_clock, dep_dl, dep_unwind, dep_elf, dep_clang, dep_version, ++ driver_swrast + ], + version : '@0@.0.0'.format(opencl_version), + install : true, +diff --git a/src/gallium/targets/opencl/target.c b/src/gallium/targets/opencl/target.c +new file mode 100644 +index 00000000000..308e23bb4a0 +--- /dev/null ++++ b/src/gallium/targets/opencl/target.c +@@ -0,0 +1,2 @@ ++#include "target-helpers/drm_helper.h" ++#include "target-helpers/sw_helper.h" +-- +2.33.1.windows.1 + diff --git a/ports/mesa/d3d10sw.patch b/ports/mesa/d3d10sw.patch deleted file mode 100644 index 98221873b0673b..00000000000000 --- a/ports/mesa/d3d10sw.patch +++ /dev/null @@ -1,383 +0,0 @@ -diff --git a/src/gallium/frontends/d3d10umd/D3DKMT.cpp b/src/gallium/frontends/d3d10umd/D3DKMT.cpp -index 1649eddc41e8f17fd9e0854acbb8e0c882d94cb5..dc31e9931876cac6ae4e52a80f6da7aa5284415c 100644 ---- a/src/gallium/frontends/d3d10umd/D3DKMT.cpp -+++ b/src/gallium/frontends/d3d10umd/D3DKMT.cpp -@@ -244,7 +244,7 @@ D3DKMTGetMultisampleMethodList(D3DKMT_GETMULTISAMPLEMETHODLIST *pData) - - - EXTERN_C NTSTATUS APIENTRY --D3DKMTPresent(CONST D3DKMT_PRESENT *pData) -+D3DKMTPresent(D3DKMT_PRESENT *pData) - { - LOG_UNSUPPORTED_ENTRYPOINT(); - return STATUS_NOT_IMPLEMENTED; -@@ -409,7 +409,7 @@ D3DKMTSetVidPnSourceOwner(CONST D3DKMT_SETVIDPNSOURCEOWNER *pData) - - - EXTERN_C NTSTATUS APIENTRY --D3DKMTSetVidPnSourceOwner1(const void *pData) -+D3DKMTSetVidPnSourceOwner1(CONST D3DKMT_SETVIDPNSOURCEOWNER1 *pData) - { - LOG_UNSUPPORTED_ENTRYPOINT(); - return STATUS_NOT_IMPLEMENTED; -diff --git a/src/gallium/frontends/d3d10umd/Device.cpp b/src/gallium/frontends/d3d10umd/Device.cpp -index afca18819ce04f28b23fee9ebdaa57b52a04426c..cd2c6cd9180eb03612500aa8d8475994a2f836fc 100644 ---- a/src/gallium/frontends/d3d10umd/Device.cpp -+++ b/src/gallium/frontends/d3d10umd/Device.cpp -@@ -32,7 +32,7 @@ - - - #include "Draw.h" --#include "Dxgi.h" -+#include "DxgiFns.h" - #include "InputAssembly.h" - #include "OutputMerger.h" - #include "Query.h" -diff --git a/src/gallium/frontends/d3d10umd/DriverIncludes.h b/src/gallium/frontends/d3d10umd/DriverIncludes.h -index e78d46fafc55557f3266e700fdc2a72305827ce6..c7df64042b5b013680ec3c8190cfac7b4b958ded 100644 ---- a/src/gallium/frontends/d3d10umd/DriverIncludes.h -+++ b/src/gallium/frontends/d3d10umd/DriverIncludes.h -@@ -43,12 +43,21 @@ - - #include - --#include "winddk/winddk_compat.h" -+#include "winddk_compat.h" - - //typedef LARGE_INTEGER PHYSICAL_ADDRESS; - //typedef __success(return >= 0) LONG NTSTATUS; - --#define D3D10DDI_MINOR_HEADER_VERSION 1 -+#define D3D10DDI_MINOR_HEADER_VERSION 2 -+ -+/* Unfortunately WinDDK's d3d10umddi.h defines D3D10.x constants as global -+ * const variables instead of preprocessor defines, causing LINK to fail due -+ * to duplicate symbols. Include d3d10_1.h to avoid the issue. -+ */ -+#ifdef _MSC_VER -+#include -+#endif -+ - #include - - #include "Debug.h" -diff --git a/src/gallium/frontends/d3d10umd/Dxgi.cpp b/src/gallium/frontends/d3d10umd/DxgiFns.cpp -similarity index 97% -rename from src/gallium/frontends/d3d10umd/Dxgi.cpp -rename to src/gallium/frontends/d3d10umd/DxgiFns.cpp -index 253f81ed283b55dd4bff29df8658f386c08cbc95..cd844a2b0fa19e23c46da0ddc3a92a9a2c9d81b6 100644 ---- a/src/gallium/frontends/d3d10umd/Dxgi.cpp -+++ b/src/gallium/frontends/d3d10umd/DxgiFns.cpp -@@ -26,13 +26,13 @@ - **************************************************************************/ - - /* -- * Dxgi.cpp -- -+ * DxgiFns.cpp -- - * DXGI related functions. - */ - - #include - --#include "Dxgi.h" -+#include "DxgiFns.h" - #include "Format.h" - #include "State.h" - -@@ -97,11 +97,11 @@ _Present(DXGI_DDI_ARG_PRESENT *pPresentData) - - void *map; - struct pipe_transfer *transfer; -- map = pipe_transfer_map(pipe, -- pSrcResource->resource, -- 0, 0, PIPE_MAP_READ, -- 0, 0, w, h, -- &transfer); -+ map = pipe_texture_map(pipe, -+ pSrcResource->resource, -+ 0, 0, PIPE_MAP_READ, -+ 0, 0, w, h, -+ &transfer); - if (map) { - - BITMAPINFO bmi; -@@ -172,7 +172,7 @@ _Present(DXGI_DDI_ARG_PRESENT *pPresentData) - DeleteDC(hdcMem); - DeleteObject(hBmp); - -- pipe_transfer_unmap(pipe, transfer); -+ pipe_texture_unmap(pipe, transfer); - } - - ReleaseDC(hWnd, hDC); -diff --git a/src/gallium/frontends/d3d10umd/Dxgi.h b/src/gallium/frontends/d3d10umd/DxgiFns.h -similarity index 96% -rename from src/gallium/frontends/d3d10umd/Dxgi.h -rename to src/gallium/frontends/d3d10umd/DxgiFns.h -index dedc2542d6ab016111a78b713b9cbe54581ba92a..3689faa307c07deb62c3f5c39b4788dd8d60cb35 100644 ---- a/src/gallium/frontends/d3d10umd/Dxgi.h -+++ b/src/gallium/frontends/d3d10umd/DxgiFns.h -@@ -26,8 +26,8 @@ - **************************************************************************/ - - /* -- * Dxgi.h -- -- * Functions that manipulate GPU resources. -+ * DxgiFns.h -- -+ * DXGI related functions - */ - - #ifndef WRAP_DXGI_H -diff --git a/src/gallium/frontends/d3d10umd/Resource.cpp b/src/gallium/frontends/d3d10umd/Resource.cpp -index a7910d2e3cf186597bb35d7c5a98464c4e844cf7..3dd91365b23e5608108a0e09e1296cb0a7bc65df 100644 ---- a/src/gallium/frontends/d3d10umd/Resource.cpp -+++ b/src/gallium/frontends/d3d10umd/Resource.cpp -@@ -270,6 +270,7 @@ CreateResource(D3D10DDI_HDEVICE hDevice, // IN - - templat.target = translate_texture_target( pCreateResource->ResourceDimension, - pCreateResource->ArraySize ); -+ pResource->buffer = templat.target == PIPE_BUFFER; - - if (pCreateResource->Format == DXGI_FORMAT_UNKNOWN) { - assert(pCreateResource->ResourceDimension == D3D10DDIRESOURCE_BUFFER); -@@ -315,37 +316,62 @@ CreateResource(D3D10DDI_HDEVICE hDevice, // IN - sizeof *pResource->transfers); - - if (pCreateResource->pInitialDataUP) { -- for (UINT SubResource = 0; SubResource < pResource->NumSubResources; ++SubResource) { -+ if (pResource->buffer) { -+ assert(pResource->NumSubResources == 1); - const D3D10_DDIARG_SUBRESOURCE_UP* pInitialDataUP = -- &pCreateResource->pInitialDataUP[SubResource]; -+ &pCreateResource->pInitialDataUP[0]; - - unsigned level; - struct pipe_box box; -- subResourceBox(pResource->resource, SubResource, &level, &box); -+ subResourceBox(pResource->resource, 0, &level, &box); - - struct pipe_transfer *transfer; - void *map; -- map = pipe->transfer_map(pipe, -- pResource->resource, -- level, -- PIPE_MAP_WRITE | -- PIPE_MAP_UNSYNCHRONIZED, -- &box, -- &transfer); -+ map = pipe->buffer_map(pipe, -+ pResource->resource, -+ level, -+ PIPE_MAP_WRITE | -+ PIPE_MAP_UNSYNCHRONIZED, -+ &box, -+ &transfer); - assert(map); - if (map) { -- for (int z = 0; z < box.depth; ++z) { -- ubyte *dst = (ubyte*)map + z*transfer->layer_stride; -- const ubyte *src = (const ubyte*)pInitialDataUP->pSysMem + z*pInitialDataUP->SysMemSlicePitch; -- util_copy_rect(dst, -- templat.format, -- transfer->stride, -- 0, 0, box.width, box.height, -- src, -- pInitialDataUP->SysMemPitch, -- 0, 0); -+ memcpy(map, pInitialDataUP->pSysMem, box.width); -+ pipe_buffer_unmap(pipe, transfer); -+ } -+ } else { -+ for (UINT SubResource = 0; SubResource < pResource->NumSubResources; ++SubResource) { -+ const D3D10_DDIARG_SUBRESOURCE_UP* pInitialDataUP = -+ &pCreateResource->pInitialDataUP[SubResource]; -+ -+ unsigned level; -+ struct pipe_box box; -+ subResourceBox(pResource->resource, SubResource, &level, &box); -+ -+ struct pipe_transfer *transfer; -+ void *map; -+ map = pipe->texture_map(pipe, -+ pResource->resource, -+ level, -+ PIPE_MAP_WRITE | -+ PIPE_MAP_UNSYNCHRONIZED, -+ &box, -+ &transfer); -+ assert(map); -+ if (map) { -+ for (int z = 0; z < box.depth; ++z) { -+ ubyte *dst = (ubyte*)map + z*transfer->layer_stride; -+ const ubyte *src = (const ubyte*)pInitialDataUP->pSysMem + z*pInitialDataUP->SysMemSlicePitch; -+ util_copy_rect(dst, -+ templat.format, -+ transfer->stride, -+ 0, 0, box.width, box.height, -+ src, -+ pInitialDataUP->SysMemPitch, -+ 0, 0); -+ } -+ pipe_texture_unmap(pipe, transfer); - } -- pipe_transfer_unmap(pipe, transfer); - } - } - } -@@ -423,7 +449,11 @@ DestroyResource(D3D10DDI_HDEVICE hDevice, // IN - - for (UINT SubResource = 0; SubResource < pResource->NumSubResources; ++SubResource) { - if (pResource->transfers[SubResource]) { -- pipe_transfer_unmap(pipe, pResource->transfers[SubResource]); -+ if (pResource->buffer) { -+ pipe_buffer_unmap(pipe, pResource->transfers[SubResource]); -+ } else { -+ pipe_texture_unmap(pipe, pResource->transfers[SubResource]); -+ } - pResource->transfers[SubResource] = NULL; - } - } -@@ -493,12 +523,21 @@ ResourceMap(D3D10DDI_HDEVICE hDevice, // IN - assert(!pResource->transfers[SubResource]); - - void *map; -- map = pipe->transfer_map(pipe, -- resource, -- level, -- usage, -- &box, -- &pResource->transfers[SubResource]); -+ if (pResource->buffer) { -+ map = pipe->buffer_map(pipe, -+ resource, -+ level, -+ usage, -+ &box, -+ &pResource->transfers[SubResource]); -+ } else { -+ map = pipe->texture_map(pipe, -+ resource, -+ level, -+ usage, -+ &box, -+ &pResource->transfers[SubResource]); -+ } - if (!map) { - DebugPrintf("%s: failed to map resource\n", __FUNCTION__); - SetError(hDevice, E_FAIL); -@@ -534,7 +573,11 @@ ResourceUnmap(D3D10DDI_HDEVICE hDevice, // IN - assert(SubResource < pResource->NumSubResources); - - if (pResource->transfers[SubResource]) { -- pipe_transfer_unmap(pipe, pResource->transfers[SubResource]); -+ if (pResource->buffer) { -+ pipe_buffer_unmap(pipe, pResource->transfers[SubResource]); -+ } else { -+ pipe_texture_unmap(pipe, pResource->transfers[SubResource]); -+ } - pResource->transfers[SubResource] = NULL; - } - } -@@ -834,7 +877,8 @@ ResourceUpdateSubResourceUP(D3D10DDI_HDEVICE hDevice, // IN - } - - struct pipe_context *pipe = pDevice->pipe; -- struct pipe_resource *dst_resource = CastPipeResource(hDstResource); -+ Resource *pDstResource = CastResource(hDstResource); -+ struct pipe_resource *dst_resource = pDstResource->resource; - - unsigned level; - struct pipe_box box; -@@ -855,12 +899,21 @@ ResourceUpdateSubResourceUP(D3D10DDI_HDEVICE hDevice, // IN - - struct pipe_transfer *transfer; - void *map; -- map = pipe->transfer_map(pipe, -- dst_resource, -- level, -- PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE, -- &box, -- &transfer); -+ if (pDstResource->buffer) { -+ map = pipe->buffer_map(pipe, -+ dst_resource, -+ level, -+ PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE, -+ &box, -+ &transfer); -+ } else { -+ map = pipe->texture_map(pipe, -+ dst_resource, -+ level, -+ PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE, -+ &box, -+ &transfer); -+ } - assert(map); - if (map) { - for (int z = 0; z < box.depth; ++z) { -@@ -874,7 +927,11 @@ ResourceUpdateSubResourceUP(D3D10DDI_HDEVICE hDevice, // IN - RowPitch, - 0, 0); - } -- pipe_transfer_unmap(pipe, transfer); -+ if (pDstResource->buffer) { -+ pipe_buffer_unmap(pipe, transfer); -+ } else { -+ pipe_texture_unmap(pipe, transfer); -+ } - } - } - -diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.c b/src/gallium/frontends/d3d10umd/ShaderParse.c -index e4b6b88aa72909b6dc02c23dd13e442f9d3f4361..1995d381880d172ac49fe0d4461d439f35cf32b5 100644 ---- a/src/gallium/frontends/d3d10umd/ShaderParse.c -+++ b/src/gallium/frontends/d3d10umd/ShaderParse.c -@@ -392,7 +392,7 @@ Shader_parse_opcode(struct Shader_parser *parser, - if (opcode_is_extended) { - /* NOTE: DECODE_IS_D3D10_SB_OPCODE_DOUBLE_EXTENDED is broken. - */ -- assert(!((*curr & D3D10_SB_OPCODE_DOUBLE_EXTENDED_MASK) >> D3D10_SB_OPERAND_DOUBLE_EXTENDED_SHIFT)); -+ assert(!((*curr & D3D10_SB_OPERAND_DOUBLE_EXTENDED_MASK) >> D3D10_SB_OPERAND_DOUBLE_EXTENDED_SHIFT)); - - switch (DECODE_D3D10_SB_EXTENDED_OPCODE_TYPE(*curr)) { - case D3D10_SB_EXTENDED_OPCODE_EMPTY: -diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.h b/src/gallium/frontends/d3d10umd/ShaderParse.h -index 5e8fba044ab5faf92f78d4f2bb75ec110752adb8..df95536f2b53eef900961f221100d4f2821a0f5d 100644 ---- a/src/gallium/frontends/d3d10umd/ShaderParse.h -+++ b/src/gallium/frontends/d3d10umd/ShaderParse.h -@@ -35,9 +35,6 @@ - - #include "DriverIncludes.h" - --//#include "winddk/winddk_compat.h" --#include "winddk/d3d10tokenizedprogramformat.hpp" -- - #ifdef __cplusplus - extern "C" { - #endif -diff --git a/src/gallium/frontends/d3d10umd/State.h b/src/gallium/frontends/d3d10umd/State.h -index 5cb865ce69573a16e24e14df88e53a0e48c80130..3e45cb797435b40da0a4a1f5476fab2aecca08fd 100644 ---- a/src/gallium/frontends/d3d10umd/State.h -+++ b/src/gallium/frontends/d3d10umd/State.h -@@ -150,6 +150,7 @@ struct Resource - DXGI_FORMAT Format; - UINT MipLevels; - UINT NumSubResources; -+ bool buffer; - struct pipe_resource *resource; - struct pipe_transfer **transfers; - struct pipe_stream_output_target *so_target; -diff --git a/src/gallium/frontends/d3d10umd/meson.build b/src/gallium/frontends/d3d10umd/meson.build -index 90774d9217d3ab5f4267974ae9018f55ab709f42..7141c8da17f7500b2d6e8e20faba9b5c70ab01d8 100644 ---- a/src/gallium/frontends/d3d10umd/meson.build -+++ b/src/gallium/frontends/d3d10umd/meson.build -@@ -14,7 +14,7 @@ libd3d10umd = static_library( - 'Debug.cpp', - 'Device.cpp', - 'Draw.cpp', -- 'Dxgi.cpp', -+ 'DxgiFns.cpp', - 'Format.cpp', - 'InputAssembly.cpp', - 'OutputMerger.cpp', diff --git a/ports/mesa/def-fixes.patch b/ports/mesa/def-fixes.patch new file mode 100644 index 00000000000000..e136112b61067b --- /dev/null +++ b/ports/mesa/def-fixes.patch @@ -0,0 +1,3419 @@ +diff --git a/bin/gen_vs_module_defs.py b/bin/gen_vs_module_defs.py +new file mode 100644 +index 0000000000000000000000000000000000000000..dff8ab36f92ffbc18dbb2779563c25df567bb7b0 +--- /dev/null ++++ b/bin/gen_vs_module_defs.py +@@ -0,0 +1,98 @@ ++#!/usr/bin/env python3 ++# Copyright © 2021-2021 Yonggang Luo ++ ++# Permission is hereby granted, free of charge, to any person obtaining a copy ++# of this software and associated documentation files (the "Software"), to deal ++# in the Software without restriction, including without limitation the rights ++# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++# copies of the Software, and to permit persons to whom the Software is ++# furnished to do so, subject to the following conditions: ++ ++# The above copyright notice and this permission notice shall be included in ++# all copies or substantial portions of the Software. ++ ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++# SOFTWARE. ++ ++gen_help = """Generates visual studio module definition file.""" ++ ++import argparse ++ ++""" ++For input template definition file ++For gcc/x64,gcc/arm64,visual studio ++`wglMakeCurrent@8 @357` => `wglMakeCurrent @357` ++`DrvCopyContext@12` => `DrvCopyContext` ++`stw_get_device` => `stw_get_device` ++For gcc/x86,gcc/arm ++`wglMakeCurrent@8 @357` => `wglMakeCurrent@8 @357 == wglMakeCurrent` ++`DrvCopyContext@12` => `DrvCopyContext@12 == DrvCopyContext` ++`stw_get_device` => `stw_get_device` ++ ++""" ++def gen_vs_module_def(in_file: str, out_file: str, compiler_id: str, cpu_family: str) -> None: ++ out_file_lines = ['EXPORTS'] ++ with open(in_file, 'r', encoding='utf-8') as f: ++ lines = f.readlines() ++ for line in lines: ++ line = line.strip() ++ tokens = line.split(';') ++ if not tokens: ++ continue ++ def_infos = [x for x in tokens[0].split(' ') if len(x) > 0] ++ if not def_infos: ++ if line: ++ out_file_lines.append('\t' + line) ++ else: ++ out_file_lines.append('') ++ continue ++ name_infos = def_infos[0].split('@') ++ if not name_infos: ++ out_file_lines.append('\t;' + line) ++ continue ++ order_info = '' if len(def_infos) <= 1 else def_infos[1] ++ if def_infos[0] != name_infos[0] and \ ++ (compiler_id == 'gcc') and (cpu_family not in {'x86_64', 'aarch64'}): ++ if order_info: ++ out_file_lines.append('\t' + def_infos[0] + ' ' + order_info + ' == ' + name_infos[0]) ++ else: ++ out_file_lines.append('\t' + def_infos[0] + ' == ' + name_infos[0]) ++ else: ++ if order_info: ++ out_file_lines.append('\t' + name_infos[0] + ' ' + order_info) ++ else: ++ out_file_lines.append('\t' + name_infos[0]) ++ with open(out_file, 'wb') as f: ++ out_file_content = '\n'.join(out_file_lines) + '\n' ++ f.write(out_file_content.encode('utf-8')) ++''' ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/libgl-gdi/opengl32.def.in --out_file src/gallium/targets/libgl-gdi/opengl32.def --compiler_id gcc --cpu_family x86_64 ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/libgl-gdi/opengl32.def.in --out_file src/gallium/targets/libgl-gdi/opengl32.mingw.def --compiler_id gcc --cpu_family x86 ++ ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/osmesa/osmesa.def.in --out_file src/gallium/targets/osmesa/osmesa.def --compiler_id gcc --cpu_family x86_64 ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/osmesa/osmesa.def.in --out_file src/gallium/targets/osmesa/osmesa.mingw.def --compiler_id gcc --cpu_family x86 ++ ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/wgl/gallium_wgl.def.in --out_file src/gallium/targets/wgl/gallium_wgl.def --compiler_id gcc --cpu_family x86_64 ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/wgl/gallium_wgl.def.in --out_file src/gallium/targets/wgl/gallium_wgl.mingw.def --compiler_id gcc --cpu_family x86 ++ ++python ./bin/gen_vs_module_defs.py --in_file src/egl/main/egl.def.in --out_file src/egl/main/egl.def --compiler_id gcc --cpu_family x86_64 ++python ./bin/gen_vs_module_defs.py --in_file src/egl/main/egl.def.in --out_file src/egl/main/egl.mingw.def --compiler_id gcc --cpu_family x86 ++ ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/lavapipe/vulkan_lvp.def.in --out_file src/gallium/targets/lavapipe/vulkan_lvp.def --compiler_id gcc --cpu_family x86_64 ++python ./bin/gen_vs_module_defs.py --in_file src/gallium/targets/lavapipe/vulkan_lvp.def.in --out_file src/gallium/targets/lavapipe/vulkan_lvp.mingw.def --compiler_id gcc --cpu_family x86 ++ ++''' ++if __name__ == "__main__": ++ parser = argparse.ArgumentParser(description=gen_help) ++ parser.add_argument('--in_file', help='input template moudle definition file') ++ parser.add_argument('--out_file', help='output moudle definition file') ++ parser.add_argument('--compiler_id', help='compiler id') ++ parser.add_argument('--cpu_family', help='cpu family') ++ args = parser.parse_args() ++ # print(args) ++ gen_vs_module_def(args.in_file, args.out_file, args.compiler_id, args.cpu_family) +diff --git a/bin/meson.build b/bin/meson.build +index 000abef770966c4baecd0b47922f42c532a8c2cf..1b7301585f9e4b0f0556ce2ae11b03b128ab4677 100644 +--- a/bin/meson.build ++++ b/bin/meson.build +@@ -19,5 +19,6 @@ + # SOFTWARE. + + git_sha1_gen_py = files('git_sha1_gen.py') ++gen_vs_module_defs_py = files('gen_vs_module_defs.py') + symbols_check = find_program('symbols-check.py') + install_megadrivers_py = find_program('install_megadrivers.py') +diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build +index a1a29a31154fdb23f0fde2d31500f31834654171..2607b5bcd4ad140a4cc8f08b6a72ae63e47c2862 100644 +--- a/src/amd/vulkan/meson.build ++++ b/src/amd/vulkan/meson.build +@@ -150,12 +150,10 @@ if with_ld_version_script + libvulkan_radeon_link_depends += files('vulkan.sym') + endif + +-vulkan_radv_def = 'vulkan_radv.def' +- + libvulkan_radeon = shared_library( + 'vulkan_radeon', + [libradv_files, radv_entrypoints, sha1_h], +- vs_module_defs : vulkan_radv_def, ++ vs_module_defs : vulkan_api_def, + include_directories : [ + inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_amd, inc_amd_common, inc_amd_common_llvm, inc_compiler, inc_util, + ], +diff --git a/src/amd/vulkan/vulkan_radv.def b/src/amd/vulkan/vulkan_radv.def +deleted file mode 100644 +index 64a9caae59398a4768f663f18f8598476991f85c..0000000000000000000000000000000000000000 +--- a/src/amd/vulkan/vulkan_radv.def ++++ /dev/null +@@ -1,4 +0,0 @@ +-EXPORTS +-vk_icdNegotiateLoaderICDInterfaceVersion +-vk_icdGetInstanceProcAddr +-vk_icdGetPhysicalDeviceProcAddr +diff --git a/src/egl/main/egl.def b/src/egl/main/egl.def +deleted file mode 100644 +index 54ae76b330929db865dc4ef0fd1723a88dc47979..0000000000000000000000000000000000000000 +--- a/src/egl/main/egl.def ++++ /dev/null +@@ -1,47 +0,0 @@ +-EXPORTS +- eglBindAPI +- eglBindTexImage +- eglChooseConfig +- eglClientWaitSync +- eglCopyBuffers +- eglCreateContext +- eglCreateImage +- eglCreatePbufferFromClientBuffer +- eglCreatePbufferSurface +- eglCreatePixmapSurface +- eglCreatePlatformPixmapSurface +- eglCreatePlatformWindowSurface +- eglCreateSync +- eglCreateWindowSurface +- eglDestroyContext +- eglDestroyImage +- eglDestroySurface +- eglDestroySync +- eglGetConfigAttrib +- eglGetConfigs +- eglGetCurrentContext +- eglGetCurrentDisplay +- eglGetCurrentSurface +- eglGetDisplay +- eglGetError +- eglGetPlatformDisplay +- eglGetProcAddress +- eglGetSyncAttrib +- eglInitialize +- eglMakeCurrent +- eglQueryAPI +- eglQueryContext +- eglQueryString +- eglQuerySurface +- eglReleaseTexImage +- eglReleaseThread +- eglSurfaceAttrib +- eglSwapBuffers +- eglSwapInterval +- eglTerminate +- eglWaitClient +- eglWaitGL +- eglWaitNative +- eglWaitSync +- MesaGLInteropEGLQueryDeviceInfo +- MesaGLInteropEGLExportObject +diff --git a/src/egl/main/egl.def.in b/src/egl/main/egl.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..b2439d9a2caaef26b48e737c8f6cd8314398ddeb +--- /dev/null ++++ b/src/egl/main/egl.def.in +@@ -0,0 +1,49 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++eglBindAPI@4 ++eglBindTexImage@12 ++eglChooseConfig@20 ++eglClientWaitSync@20 ++eglCopyBuffers@12 ++eglCreateContext@16 ++eglCreateImage@20 ++eglCreatePbufferFromClientBuffer@20 ++eglCreatePbufferSurface@12 ++eglCreatePixmapSurface@16 ++eglCreatePlatformPixmapSurface@16 ++eglCreatePlatformWindowSurface@16 ++eglCreateSync@12 ++eglCreateWindowSurface@16 ++eglDestroyContext@8 ++eglDestroyImage@8 ++eglDestroySurface@8 ++eglDestroySync@8 ++eglGetConfigAttrib@16 ++eglGetConfigs@16 ++eglGetCurrentContext@0 ++eglGetCurrentDisplay@0 ++eglGetCurrentSurface@4 ++eglGetDisplay@4 ++eglGetError@0 ++eglGetPlatformDisplay@12 ++eglGetProcAddress@4 ++eglGetSyncAttrib@16 ++eglInitialize@12 ++eglMakeCurrent@16 ++eglQueryAPI@0 ++eglQueryContext@16 ++eglQueryString@8 ++eglQuerySurface@16 ++eglReleaseTexImage@12 ++eglReleaseThread@0 ++eglSurfaceAttrib@16 ++eglSwapBuffers@8 ++eglSwapInterval@8 ++eglTerminate@4 ++eglWaitClient@0 ++eglWaitGL@0 ++eglWaitNative@4 ++eglWaitSync@12 ++ ++; __cdecl calling convention have no @number suffix ++MesaGLInteropEGLQueryDeviceInfo ++MesaGLInteropEGLExportObject +diff --git a/src/egl/meson.build b/src/egl/meson.build +index 315a95013f39b76a47067073f106eda518dc6b71..53044297322ad6ea3137bd1fe48b778a61608f5e 100644 +--- a/src/egl/meson.build ++++ b/src/egl/meson.build +@@ -177,6 +177,15 @@ else + ) + endif + ++egl_def = custom_target( ++ 'egl.def', ++ input: 'main/egl.def.in', ++ output : 'egl.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) ++ + libegl = shared_library( + egl_lib_name, + files_egl, +@@ -194,7 +203,7 @@ libegl = shared_library( + version : egl_lib_version, + soversion : egl_lib_soversion, + name_prefix : 'lib', # even on windows +- vs_module_defs : 'main/egl.def' ++ vs_module_defs : egl_def + ) + + if not with_glvnd +diff --git a/src/gallium/frontends/osmesa/meson.build b/src/gallium/frontends/osmesa/meson.build +index e5848fd9934afc22119a14122e6c2d095ab8f350..fe78a4daa31bb01bf8535ff4498172241e554610 100644 +--- a/src/gallium/frontends/osmesa/meson.build ++++ b/src/gallium/frontends/osmesa/meson.build +@@ -20,7 +20,7 @@ + + osmesa_st_c_args = [] + if with_platform_windows +- osmesa_st_c_args += ['-DBUILD_GL32', '-DWIN32_LEAN_AND_MEAN'] ++ osmesa_st_c_args += ['-DWIN32_LEAN_AND_MEAN'] + if not with_shared_glapi + osmesa_st_c_args += ['-D_GLAPI_NO_EXPORTS'] + endif +diff --git a/src/gallium/targets/d3d10sw/meson.build b/src/gallium/targets/d3d10sw/meson.build +index fe8632d3c7ff3f1a61a20f6bd88f25e697316e10..a5acb95c80eaeba0a92aa2d7e6cedd91658b56d2 100644 +--- a/src/gallium/targets/d3d10sw/meson.build ++++ b/src/gallium/targets/d3d10sw/meson.build +@@ -20,10 +20,6 @@ + # SOFTWARE. + + d3d10sw_def = files('../../frontends/d3d10umd/d3d10_sw.def')[0] +-_link_args_d3d10sw = [] +-if cc.get_id() == 'gcc' +- _link_args_d3d10sw += '-Wl,--enable-stdcall-fixup' +-endif + + libd3d10sw = shared_library( + 'd3d10sw', +@@ -32,7 +28,6 @@ libd3d10sw = shared_library( + include_directories : [ + inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_d3d10umd, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers, + ], +- link_args : _link_args_d3d10sw, + link_whole : [libd3d10umd], + link_with : [ + libgallium, libwsgdi +diff --git a/src/gallium/targets/lavapipe/meson.build b/src/gallium/targets/lavapipe/meson.build +index f2b363099ae154b71efd7c217598e0eb48ff3a0c..bda4fbc574d7f5d7ca2b903ff928c72951022132 100644 +--- a/src/gallium/targets/lavapipe/meson.build ++++ b/src/gallium/targets/lavapipe/meson.build +@@ -1,14 +1,9 @@ + +-if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64' +- vulkan_lvp_def = 'vulkan_lvp.mingw.def' +-else +- vulkan_lvp_def = 'vulkan_lvp.def' +-endif + + libvulkan_lvp = shared_library( + 'vulkan_lvp', + [ 'target.c' ], +- vs_module_defs : vulkan_lvp_def, ++ vs_module_defs : vulkan_api_def, + include_directories : [ inc_src, inc_util, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_winsys, inc_gallium_drivers ], + link_whole : [ liblavapipe_st ], + link_with : [libpipe_loader_static, libgallium, libwsw, libswdri, libws_null, libswkmsdri ], +diff --git a/src/gallium/targets/lavapipe/vulkan_lvp.def b/src/gallium/targets/lavapipe/vulkan_lvp.def +deleted file mode 100644 +index 64a9caae59398a4768f663f18f8598476991f85c..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/lavapipe/vulkan_lvp.def ++++ /dev/null +@@ -1,4 +0,0 @@ +-EXPORTS +-vk_icdNegotiateLoaderICDInterfaceVersion +-vk_icdGetInstanceProcAddr +-vk_icdGetPhysicalDeviceProcAddr +diff --git a/src/gallium/targets/lavapipe/vulkan_lvp.mingw.def b/src/gallium/targets/lavapipe/vulkan_lvp.mingw.def +deleted file mode 100644 +index c9638323ab044f072ad30f5089074909f769b8d4..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/lavapipe/vulkan_lvp.mingw.def ++++ /dev/null +@@ -1,4 +0,0 @@ +-EXPORTS +-vk_icdNegotiateLoaderICDInterfaceVersion@4 +-vk_icdGetInstanceProcAddr = vk_icdGetInstanceProcAddr@8 +-vk_icdGetPhysicalDeviceProcAddr = vk_icdGetPhysicalDeviceProcAddr@8 +diff --git a/src/gallium/targets/libgl-gdi/meson.build b/src/gallium/targets/libgl-gdi/meson.build +index 25300000221d44c7d669ec49df1fb88396f5c968..b333eae0f34227b0dfd1abc08006680ea5359224 100644 +--- a/src/gallium/targets/libgl-gdi/meson.build ++++ b/src/gallium/targets/libgl-gdi/meson.build +@@ -20,20 +20,20 @@ + + + opengl32_link_args = [] +-if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64' +- opengl32_link_args += ['-Wl,--enable-stdcall-fixup'] +-endif + +-if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64' +- ogl_def = 'opengl32.mingw.def' +-else +- ogl_def = 'opengl32.def' +-endif ++opengl32_def = custom_target( ++ 'opengl32.def', ++ input: 'opengl32.def.in', ++ output : 'opengl32.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) + + libopengl32 = shared_library( + 'opengl32', + ['stw_wgl.c'], +- vs_module_defs : ogl_def, ++ vs_module_defs : opengl32_def, + include_directories : [ + inc_include, inc_wgl, inc_src, + ], +diff --git a/src/gallium/targets/libgl-gdi/opengl32.def b/src/gallium/targets/libgl-gdi/opengl32.def +deleted file mode 100644 +index d89f0bdb52ab65dc8c1ebb8b9ff79eaf5da41fd8..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/libgl-gdi/opengl32.def ++++ /dev/null +@@ -1,388 +0,0 @@ +-EXPORTS +-; GlmfBeginGlsBlock @1 +-; GlmfCloseMetaFile @2 +-; GlmfEndGlsBlock @3 +-; GlmfEndPlayback @4 +-; GlmfInitPlayback @5 +-; GlmfPlayGlsRecord @6 +- glAccum @7 +- glAlphaFunc @8 +- glAreTexturesResident @9 +- glArrayElement @10 +- glBegin @11 +- glBindTexture @12 +- glBitmap @13 +- glBlendFunc @14 +- glCallList @15 +- glCallLists @16 +- glClear @17 +- glClearAccum @18 +- glClearColor @19 +- glClearDepth @20 +- glClearIndex @21 +- glClearStencil @22 +- glClipPlane @23 +- glColor3b @24 +- glColor3bv @25 +- glColor3d @26 +- glColor3dv @27 +- glColor3f @28 +- glColor3fv @29 +- glColor3i @30 +- glColor3iv @31 +- glColor3s @32 +- glColor3sv @33 +- glColor3ub @34 +- glColor3ubv @35 +- glColor3ui @36 +- glColor3uiv @37 +- glColor3us @38 +- glColor3usv @39 +- glColor4b @40 +- glColor4bv @41 +- glColor4d @42 +- glColor4dv @43 +- glColor4f @44 +- glColor4fv @45 +- glColor4i @46 +- glColor4iv @47 +- glColor4s @48 +- glColor4sv @49 +- glColor4ub @50 +- glColor4ubv @51 +- glColor4ui @52 +- glColor4uiv @53 +- glColor4us @54 +- glColor4usv @55 +- glColorMask @56 +- glColorMaterial @57 +- glColorPointer @58 +- glCopyPixels @59 +- glCopyTexImage1D @60 +- glCopyTexImage2D @61 +- glCopyTexSubImage1D @62 +- glCopyTexSubImage2D @63 +- glCullFace @64 +-; glDebugEntry @65 +- glDeleteLists @66 +- glDeleteTextures @67 +- glDepthFunc @68 +- glDepthMask @69 +- glDepthRange @70 +- glDisable @71 +- glDisableClientState @72 +- glDrawArrays @73 +- glDrawBuffer @74 +- glDrawElements @75 +- glDrawPixels @76 +- glEdgeFlag @77 +- glEdgeFlagPointer @78 +- glEdgeFlagv @79 +- glEnable @80 +- glEnableClientState @81 +- glEnd @82 +- glEndList @83 +- glEvalCoord1d @84 +- glEvalCoord1dv @85 +- glEvalCoord1f @86 +- glEvalCoord1fv @87 +- glEvalCoord2d @88 +- glEvalCoord2dv @89 +- glEvalCoord2f @90 +- glEvalCoord2fv @91 +- glEvalMesh1 @92 +- glEvalMesh2 @93 +- glEvalPoint1 @94 +- glEvalPoint2 @95 +- glFeedbackBuffer @96 +- glFinish @97 +- glFlush @98 +- glFogf @99 +- glFogfv @100 +- glFogi @101 +- glFogiv @102 +- glFrontFace @103 +- glFrustum @104 +- glGenLists @105 +- glGenTextures @106 +- glGetBooleanv @107 +- glGetClipPlane @108 +- glGetDoublev @109 +- glGetError @110 +- glGetFloatv @111 +- glGetIntegerv @112 +- glGetLightfv @113 +- glGetLightiv @114 +- glGetMapdv @115 +- glGetMapfv @116 +- glGetMapiv @117 +- glGetMaterialfv @118 +- glGetMaterialiv @119 +- glGetPixelMapfv @120 +- glGetPixelMapuiv @121 +- glGetPixelMapusv @122 +- glGetPointerv @123 +- glGetPolygonStipple @124 +- glGetString @125 +- glGetTexEnvfv @126 +- glGetTexEnviv @127 +- glGetTexGendv @128 +- glGetTexGenfv @129 +- glGetTexGeniv @130 +- glGetTexImage @131 +- glGetTexLevelParameterfv @132 +- glGetTexLevelParameteriv @133 +- glGetTexParameterfv @134 +- glGetTexParameteriv @135 +- glHint @136 +- glIndexMask @137 +- glIndexPointer @138 +- glIndexd @139 +- glIndexdv @140 +- glIndexf @141 +- glIndexfv @142 +- glIndexi @143 +- glIndexiv @144 +- glIndexs @145 +- glIndexsv @146 +- glIndexub @147 +- glIndexubv @148 +- glInitNames @149 +- glInterleavedArrays @150 +- glIsEnabled @151 +- glIsList @152 +- glIsTexture @153 +- glLightModelf @154 +- glLightModelfv @155 +- glLightModeli @156 +- glLightModeliv @157 +- glLightf @158 +- glLightfv @159 +- glLighti @160 +- glLightiv @161 +- glLineStipple @162 +- glLineWidth @163 +- glListBase @164 +- glLoadIdentity @165 +- glLoadMatrixd @166 +- glLoadMatrixf @167 +- glLoadName @168 +- glLogicOp @169 +- glMap1d @170 +- glMap1f @171 +- glMap2d @172 +- glMap2f @173 +- glMapGrid1d @174 +- glMapGrid1f @175 +- glMapGrid2d @176 +- glMapGrid2f @177 +- glMaterialf @178 +- glMaterialfv @179 +- glMateriali @180 +- glMaterialiv @181 +- glMatrixMode @182 +- glMultMatrixd @183 +- glMultMatrixf @184 +- glNewList @185 +- glNormal3b @186 +- glNormal3bv @187 +- glNormal3d @188 +- glNormal3dv @189 +- glNormal3f @190 +- glNormal3fv @191 +- glNormal3i @192 +- glNormal3iv @193 +- glNormal3s @194 +- glNormal3sv @195 +- glNormalPointer @196 +- glOrtho @197 +- glPassThrough @198 +- glPixelMapfv @199 +- glPixelMapuiv @200 +- glPixelMapusv @201 +- glPixelStoref @202 +- glPixelStorei @203 +- glPixelTransferf @204 +- glPixelTransferi @205 +- glPixelZoom @206 +- glPointSize @207 +- glPolygonMode @208 +- glPolygonOffset @209 +- glPolygonStipple @210 +- glPopAttrib @211 +- glPopClientAttrib @212 +- glPopMatrix @213 +- glPopName @214 +- glPrioritizeTextures @215 +- glPushAttrib @216 +- glPushClientAttrib @217 +- glPushMatrix @218 +- glPushName @219 +- glRasterPos2d @220 +- glRasterPos2dv @221 +- glRasterPos2f @222 +- glRasterPos2fv @223 +- glRasterPos2i @224 +- glRasterPos2iv @225 +- glRasterPos2s @226 +- glRasterPos2sv @227 +- glRasterPos3d @228 +- glRasterPos3dv @229 +- glRasterPos3f @230 +- glRasterPos3fv @231 +- glRasterPos3i @232 +- glRasterPos3iv @233 +- glRasterPos3s @234 +- glRasterPos3sv @235 +- glRasterPos4d @236 +- glRasterPos4dv @237 +- glRasterPos4f @238 +- glRasterPos4fv @239 +- glRasterPos4i @240 +- glRasterPos4iv @241 +- glRasterPos4s @242 +- glRasterPos4sv @243 +- glReadBuffer @244 +- glReadPixels @245 +- glRectd @246 +- glRectdv @247 +- glRectf @248 +- glRectfv @249 +- glRecti @250 +- glRectiv @251 +- glRects @252 +- glRectsv @253 +- glRenderMode @254 +- glRotated @255 +- glRotatef @256 +- glScaled @257 +- glScalef @258 +- glScissor @259 +- glSelectBuffer @260 +- glShadeModel @261 +- glStencilFunc @262 +- glStencilMask @263 +- glStencilOp @264 +- glTexCoord1d @265 +- glTexCoord1dv @266 +- glTexCoord1f @267 +- glTexCoord1fv @268 +- glTexCoord1i @269 +- glTexCoord1iv @270 +- glTexCoord1s @271 +- glTexCoord1sv @272 +- glTexCoord2d @273 +- glTexCoord2dv @274 +- glTexCoord2f @275 +- glTexCoord2fv @276 +- glTexCoord2i @277 +- glTexCoord2iv @278 +- glTexCoord2s @279 +- glTexCoord2sv @280 +- glTexCoord3d @281 +- glTexCoord3dv @282 +- glTexCoord3f @283 +- glTexCoord3fv @284 +- glTexCoord3i @285 +- glTexCoord3iv @286 +- glTexCoord3s @287 +- glTexCoord3sv @288 +- glTexCoord4d @289 +- glTexCoord4dv @290 +- glTexCoord4f @291 +- glTexCoord4fv @292 +- glTexCoord4i @293 +- glTexCoord4iv @294 +- glTexCoord4s @295 +- glTexCoord4sv @296 +- glTexCoordPointer @297 +- glTexEnvf @298 +- glTexEnvfv @299 +- glTexEnvi @300 +- glTexEnviv @301 +- glTexGend @302 +- glTexGendv @303 +- glTexGenf @304 +- glTexGenfv @305 +- glTexGeni @306 +- glTexGeniv @307 +- glTexImage1D @308 +- glTexImage2D @309 +- glTexParameterf @310 +- glTexParameterfv @311 +- glTexParameteri @312 +- glTexParameteriv @313 +- glTexSubImage1D @314 +- glTexSubImage2D @315 +- glTranslated @316 +- glTranslatef @317 +- glVertex2d @318 +- glVertex2dv @319 +- glVertex2f @320 +- glVertex2fv @321 +- glVertex2i @322 +- glVertex2iv @323 +- glVertex2s @324 +- glVertex2sv @325 +- glVertex3d @326 +- glVertex3dv @327 +- glVertex3f @328 +- glVertex3fv @329 +- glVertex3i @330 +- glVertex3iv @331 +- glVertex3s @332 +- glVertex3sv @333 +- glVertex4d @334 +- glVertex4dv @335 +- glVertex4f @336 +- glVertex4fv @337 +- glVertex4i @338 +- glVertex4iv @339 +- glVertex4s @340 +- glVertex4sv @341 +- glVertexPointer @342 +- glViewport @343 +- wglChoosePixelFormat @344 +- wglCopyContext @345 +- wglCreateContext @346 +- wglCreateLayerContext @347 +- wglDeleteContext @348 +- wglDescribeLayerPlane @349 +- wglDescribePixelFormat @350 +- wglGetCurrentContext @351 +- wglGetCurrentDC @352 +-; wglGetDefaultProcAddress @353 +- wglGetLayerPaletteEntries @354 +- wglGetPixelFormat @355 +- wglGetProcAddress @356 +- wglMakeCurrent @357 +- wglRealizeLayerPalette @358 +- wglSetLayerPaletteEntries @359 +- wglSetPixelFormat @360 +- wglShareLists @361 +- wglSwapBuffers @362 +- wglSwapLayerBuffers @363 +- wglSwapMultipleBuffers @364 +- wglUseFontBitmapsA @365 +- wglUseFontBitmapsW @366 +- wglUseFontOutlinesA @367 +- wglUseFontOutlinesW @368 +- DrvCopyContext +- DrvCreateContext +- DrvCreateLayerContext +- DrvDeleteContext +- DrvDescribeLayerPlane +- DrvDescribePixelFormat +- DrvGetLayerPaletteEntries +- DrvGetProcAddress +- DrvPresentBuffers +- DrvRealizeLayerPalette +- DrvReleaseContext +- DrvSetCallbackProcs +- DrvSetContext +- DrvSetLayerPaletteEntries +- DrvSetPixelFormat +- DrvShareLists +- DrvSwapBuffers +- DrvSwapLayerBuffers +- DrvValidateVersion +diff --git a/src/gallium/targets/libgl-gdi/opengl32.def.in b/src/gallium/targets/libgl-gdi/opengl32.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..ceffdf09936f95506090d79a99ef95ef89cc7ddc +--- /dev/null ++++ b/src/gallium/targets/libgl-gdi/opengl32.def.in +@@ -0,0 +1,389 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++;GlmfBeginGlsBlock@4 @1 ++;GlmfCloseMetaFile@4 @2 ++;GlmfEndGlsBlock@4 @3 ++;GlmfEndPlayback@4 @4 ++;GlmfInitPlayback@12 @5 ++;GlmfPlayGlsRecord@16 @6 ++glAccum@8 @7 ++glAlphaFunc@8 @8 ++glAreTexturesResident@12 @9 ++glArrayElement@4 @10 ++glBegin@4 @11 ++glBindTexture@8 @12 ++glBitmap@28 @13 ++glBlendFunc@8 @14 ++glCallList@4 @15 ++glCallLists@12 @16 ++glClear@4 @17 ++glClearAccum@16 @18 ++glClearColor@16 @19 ++glClearDepth@8 @20 ++glClearIndex@4 @21 ++glClearStencil@4 @22 ++glClipPlane@8 @23 ++glColor3b@12 @24 ++glColor3bv@4 @25 ++glColor3d@24 @26 ++glColor3dv@4 @27 ++glColor3f@12 @28 ++glColor3fv@4 @29 ++glColor3i@12 @30 ++glColor3iv@4 @31 ++glColor3s@12 @32 ++glColor3sv@4 @33 ++glColor3ub@12 @34 ++glColor3ubv@4 @35 ++glColor3ui@12 @36 ++glColor3uiv@4 @37 ++glColor3us@12 @38 ++glColor3usv@4 @39 ++glColor4b@16 @40 ++glColor4bv@4 @41 ++glColor4d@32 @42 ++glColor4dv@4 @43 ++glColor4f@16 @44 ++glColor4fv@4 @45 ++glColor4i@16 @46 ++glColor4iv@4 @47 ++glColor4s@16 @48 ++glColor4sv@4 @49 ++glColor4ub@16 @50 ++glColor4ubv@4 @51 ++glColor4ui@16 @52 ++glColor4uiv@4 @53 ++glColor4us@16 @54 ++glColor4usv@4 @55 ++glColorMask@16 @56 ++glColorMaterial@8 @57 ++glColorPointer@16 @58 ++glCopyPixels@20 @59 ++glCopyTexImage1D@28 @60 ++glCopyTexImage2D@32 @61 ++glCopyTexSubImage1D@24 @62 ++glCopyTexSubImage2D@32 @63 ++glCullFace@4 @64 ++;glDebugEntry@8 @65 ++glDeleteLists@8 @66 ++glDeleteTextures@8 @67 ++glDepthFunc@4 @68 ++glDepthMask@4 @69 ++glDepthRange@16 @70 ++glDisable@4 @71 ++glDisableClientState@4 @72 ++glDrawArrays@12 @73 ++glDrawBuffer@4 @74 ++glDrawElements@16 @75 ++glDrawPixels@20 @76 ++glEdgeFlag@4 @77 ++glEdgeFlagPointer@8 @78 ++glEdgeFlagv@4 @79 ++glEnable@4 @80 ++glEnableClientState@4 @81 ++glEnd@0 @82 ++glEndList@0 @83 ++glEvalCoord1d@8 @84 ++glEvalCoord1dv@4 @85 ++glEvalCoord1f@4 @86 ++glEvalCoord1fv@4 @87 ++glEvalCoord2d@16 @88 ++glEvalCoord2dv@4 @89 ++glEvalCoord2f@8 @90 ++glEvalCoord2fv@4 @91 ++glEvalMesh1@12 @92 ++glEvalMesh2@20 @93 ++glEvalPoint1@4 @94 ++glEvalPoint2@8 @95 ++glFeedbackBuffer@12 @96 ++glFinish@0 @97 ++glFlush@0 @98 ++glFogf@8 @99 ++glFogfv@8 @100 ++glFogi@8 @101 ++glFogiv@8 @102 ++glFrontFace@4 @103 ++glFrustum@48 @104 ++glGenLists@4 @105 ++glGenTextures@8 @106 ++glGetBooleanv@8 @107 ++glGetClipPlane@8 @108 ++glGetDoublev@8 @109 ++glGetError@0 @110 ++glGetFloatv@8 @111 ++glGetIntegerv@8 @112 ++glGetLightfv@12 @113 ++glGetLightiv@12 @114 ++glGetMapdv@12 @115 ++glGetMapfv@12 @116 ++glGetMapiv@12 @117 ++glGetMaterialfv@12 @118 ++glGetMaterialiv@12 @119 ++glGetPixelMapfv@8 @120 ++glGetPixelMapuiv@8 @121 ++glGetPixelMapusv@8 @122 ++glGetPointerv@8 @123 ++glGetPolygonStipple@4 @124 ++glGetString@4 @125 ++glGetTexEnvfv@12 @126 ++glGetTexEnviv@12 @127 ++glGetTexGendv@12 @128 ++glGetTexGenfv@12 @129 ++glGetTexGeniv@12 @130 ++glGetTexImage@20 @131 ++glGetTexLevelParameterfv@16 @132 ++glGetTexLevelParameteriv@16 @133 ++glGetTexParameterfv@12 @134 ++glGetTexParameteriv@12 @135 ++glHint@8 @136 ++glIndexMask@4 @137 ++glIndexPointer@12 @138 ++glIndexd@8 @139 ++glIndexdv@4 @140 ++glIndexf@4 @141 ++glIndexfv@4 @142 ++glIndexi@4 @143 ++glIndexiv@4 @144 ++glIndexs@4 @145 ++glIndexsv@4 @146 ++glIndexub@4 @147 ++glIndexubv@4 @148 ++glInitNames@0 @149 ++glInterleavedArrays@12 @150 ++glIsEnabled@4 @151 ++glIsList@4 @152 ++glIsTexture@4 @153 ++glLightModelf@8 @154 ++glLightModelfv@8 @155 ++glLightModeli@8 @156 ++glLightModeliv@8 @157 ++glLightf@12 @158 ++glLightfv@12 @159 ++glLighti@12 @160 ++glLightiv@12 @161 ++glLineStipple@8 @162 ++glLineWidth@4 @163 ++glListBase@4 @164 ++glLoadIdentity@0 @165 ++glLoadMatrixd@4 @166 ++glLoadMatrixf@4 @167 ++glLoadName@4 @168 ++glLogicOp@4 @169 ++glMap1d@32 @170 ++glMap1f@24 @171 ++glMap2d@56 @172 ++glMap2f@40 @173 ++glMapGrid1d@20 @174 ++glMapGrid1f@12 @175 ++glMapGrid2d@40 @176 ++glMapGrid2f@24 @177 ++glMaterialf@12 @178 ++glMaterialfv@12 @179 ++glMateriali@12 @180 ++glMaterialiv@12 @181 ++glMatrixMode@4 @182 ++glMultMatrixd@4 @183 ++glMultMatrixf@4 @184 ++glNewList@8 @185 ++glNormal3b@12 @186 ++glNormal3bv@4 @187 ++glNormal3d@24 @188 ++glNormal3dv@4 @189 ++glNormal3f@12 @190 ++glNormal3fv@4 @191 ++glNormal3i@12 @192 ++glNormal3iv@4 @193 ++glNormal3s@12 @194 ++glNormal3sv@4 @195 ++glNormalPointer@12 @196 ++glOrtho@48 @197 ++glPassThrough@4 @198 ++glPixelMapfv@12 @199 ++glPixelMapuiv@12 @200 ++glPixelMapusv@12 @201 ++glPixelStoref@8 @202 ++glPixelStorei@8 @203 ++glPixelTransferf@8 @204 ++glPixelTransferi@8 @205 ++glPixelZoom@8 @206 ++glPointSize@4 @207 ++glPolygonMode@8 @208 ++glPolygonOffset@8 @209 ++glPolygonStipple@4 @210 ++glPopAttrib@0 @211 ++glPopClientAttrib@0 @212 ++glPopMatrix@0 @213 ++glPopName@0 @214 ++glPrioritizeTextures@12 @215 ++glPushAttrib@4 @216 ++glPushClientAttrib@4 @217 ++glPushMatrix@0 @218 ++glPushName@4 @219 ++glRasterPos2d@16 @220 ++glRasterPos2dv@4 @221 ++glRasterPos2f@8 @222 ++glRasterPos2fv@4 @223 ++glRasterPos2i@8 @224 ++glRasterPos2iv@4 @225 ++glRasterPos2s@8 @226 ++glRasterPos2sv@4 @227 ++glRasterPos3d@24 @228 ++glRasterPos3dv@4 @229 ++glRasterPos3f@12 @230 ++glRasterPos3fv@4 @231 ++glRasterPos3i@12 @232 ++glRasterPos3iv@4 @233 ++glRasterPos3s@12 @234 ++glRasterPos3sv@4 @235 ++glRasterPos4d@32 @236 ++glRasterPos4dv@4 @237 ++glRasterPos4f@16 @238 ++glRasterPos4fv@4 @239 ++glRasterPos4i@16 @240 ++glRasterPos4iv@4 @241 ++glRasterPos4s@16 @242 ++glRasterPos4sv@4 @243 ++glReadBuffer@4 @244 ++glReadPixels@28 @245 ++glRectd@32 @246 ++glRectdv@8 @247 ++glRectf@16 @248 ++glRectfv@8 @249 ++glRecti@16 @250 ++glRectiv@8 @251 ++glRects@16 @252 ++glRectsv@8 @253 ++glRenderMode@4 @254 ++glRotated@32 @255 ++glRotatef@16 @256 ++glScaled@24 @257 ++glScalef@12 @258 ++glScissor@16 @259 ++glSelectBuffer@8 @260 ++glShadeModel@4 @261 ++glStencilFunc@12 @262 ++glStencilMask@4 @263 ++glStencilOp@12 @264 ++glTexCoord1d@8 @265 ++glTexCoord1dv@4 @266 ++glTexCoord1f@4 @267 ++glTexCoord1fv@4 @268 ++glTexCoord1i@4 @269 ++glTexCoord1iv@4 @270 ++glTexCoord1s@4 @271 ++glTexCoord1sv@4 @272 ++glTexCoord2d@16 @273 ++glTexCoord2dv@4 @274 ++glTexCoord2f@8 @275 ++glTexCoord2fv@4 @276 ++glTexCoord2i@8 @277 ++glTexCoord2iv@4 @278 ++glTexCoord2s@8 @279 ++glTexCoord2sv@4 @280 ++glTexCoord3d@24 @281 ++glTexCoord3dv@4 @282 ++glTexCoord3f@12 @283 ++glTexCoord3fv@4 @284 ++glTexCoord3i@12 @285 ++glTexCoord3iv@4 @286 ++glTexCoord3s@12 @287 ++glTexCoord3sv@4 @288 ++glTexCoord4d@32 @289 ++glTexCoord4dv@4 @290 ++glTexCoord4f@16 @291 ++glTexCoord4fv@4 @292 ++glTexCoord4i@16 @293 ++glTexCoord4iv@4 @294 ++glTexCoord4s@16 @295 ++glTexCoord4sv@4 @296 ++glTexCoordPointer@16 @297 ++glTexEnvf@12 @298 ++glTexEnvfv@12 @299 ++glTexEnvi@12 @300 ++glTexEnviv@12 @301 ++glTexGend@16 @302 ++glTexGendv@12 @303 ++glTexGenf@12 @304 ++glTexGenfv@12 @305 ++glTexGeni@12 @306 ++glTexGeniv@12 @307 ++glTexImage1D@32 @308 ++glTexImage2D@36 @309 ++glTexParameterf@12 @310 ++glTexParameterfv@12 @311 ++glTexParameteri@12 @312 ++glTexParameteriv@12 @313 ++glTexSubImage1D@28 @314 ++glTexSubImage2D@36 @315 ++glTranslated@24 @316 ++glTranslatef@12 @317 ++glVertex2d@16 @318 ++glVertex2dv@4 @319 ++glVertex2f@8 @320 ++glVertex2fv@4 @321 ++glVertex2i@8 @322 ++glVertex2iv@4 @323 ++glVertex2s@8 @324 ++glVertex2sv@4 @325 ++glVertex3d@24 @326 ++glVertex3dv@4 @327 ++glVertex3f@12 @328 ++glVertex3fv@4 @329 ++glVertex3i@12 @330 ++glVertex3iv@4 @331 ++glVertex3s@12 @332 ++glVertex3sv@4 @333 ++glVertex4d@32 @334 ++glVertex4dv@4 @335 ++glVertex4f@16 @336 ++glVertex4fv@4 @337 ++glVertex4i@16 @338 ++glVertex4iv@4 @339 ++glVertex4s@16 @340 ++glVertex4sv@4 @341 ++glVertexPointer@16 @342 ++glViewport@16 @343 ++wglChoosePixelFormat@8 @344 ++wglCopyContext@12 @345 ++wglCreateContext@4 @346 ++wglCreateLayerContext@8 @347 ++wglDeleteContext@4 @348 ++wglDescribeLayerPlane@20 @349 ++wglDescribePixelFormat@16 @350 ++wglGetCurrentContext@0 @351 ++wglGetCurrentDC@0 @352 ++;wglGetDefaultProcAddress@4 @353 ++wglGetLayerPaletteEntries@20 @354 ++wglGetPixelFormat@4 @355 ++wglGetProcAddress@4 @356 ++wglMakeCurrent@8 @357 ++wglRealizeLayerPalette@12 @358 ++wglSetLayerPaletteEntries@20 @359 ++wglSetPixelFormat@12 @360 ++wglShareLists@8 @361 ++wglSwapBuffers@4 @362 ++wglSwapLayerBuffers@8 @363 ++wglSwapMultipleBuffers@8 @364 ++wglUseFontBitmapsA@16 @365 ++wglUseFontBitmapsW@16 @366 ++wglUseFontOutlinesA@32 @367 ++wglUseFontOutlinesW@32 @368 ++ ++DrvCopyContext@12 ++DrvCreateContext@4 ++DrvCreateLayerContext@8 ++DrvDeleteContext@4 ++DrvDescribeLayerPlane@20 ++DrvDescribePixelFormat@16 ++DrvGetLayerPaletteEntries@20 ++DrvGetProcAddress@4 ++DrvPresentBuffers@8 ++DrvRealizeLayerPalette@12 ++DrvReleaseContext@4 ++DrvSetCallbackProcs@8 ++DrvSetContext@12 ++DrvSetLayerPaletteEntries@20 ++DrvSetPixelFormat@8 ++DrvShareLists@8 ++DrvSwapBuffers@4 ++DrvSwapLayerBuffers@8 ++DrvValidateVersion@4 +diff --git a/src/gallium/targets/libgl-gdi/opengl32.mingw.def b/src/gallium/targets/libgl-gdi/opengl32.mingw.def +deleted file mode 100644 +index 485c9d44a877e59827d48cb967f30710f6f5749d..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/libgl-gdi/opengl32.mingw.def ++++ /dev/null +@@ -1,357 +0,0 @@ +-EXPORTS +- glAccum = glAccum@8 +- glAlphaFunc = glAlphaFunc@8 +- glAreTexturesResident = glAreTexturesResident@12 +- glArrayElement = glArrayElement@4 +- glBegin = glBegin@4 +- glBindTexture = glBindTexture@8 +- glBitmap = glBitmap@28 +- glBlendFunc = glBlendFunc@8 +- glCallList = glCallList@4 +- glCallLists = glCallLists@12 +- glClear = glClear@4 +- glClearAccum = glClearAccum@16 +- glClearColor = glClearColor@16 +- glClearDepth = glClearDepth@8 +- glClearIndex = glClearIndex@4 +- glClearStencil = glClearStencil@4 +- glClipPlane = glClipPlane@8 +- glColor3b = glColor3b@12 +- glColor3bv = glColor3bv@4 +- glColor3d = glColor3d@24 +- glColor3dv = glColor3dv@4 +- glColor3f = glColor3f@12 +- glColor3fv = glColor3fv@4 +- glColor3i = glColor3i@12 +- glColor3iv = glColor3iv@4 +- glColor3s = glColor3s@12 +- glColor3sv = glColor3sv@4 +- glColor3ub = glColor3ub@12 +- glColor3ubv = glColor3ubv@4 +- glColor3ui = glColor3ui@12 +- glColor3uiv = glColor3uiv@4 +- glColor3us = glColor3us@12 +- glColor3usv = glColor3usv@4 +- glColor4b = glColor4b@16 +- glColor4bv = glColor4bv@4 +- glColor4d = glColor4d@32 +- glColor4dv = glColor4dv@4 +- glColor4f = glColor4f@16 +- glColor4fv = glColor4fv@4 +- glColor4i = glColor4i@16 +- glColor4iv = glColor4iv@4 +- glColor4s = glColor4s@16 +- glColor4sv = glColor4sv@4 +- glColor4ub = glColor4ub@16 +- glColor4ubv = glColor4ubv@4 +- glColor4ui = glColor4ui@16 +- glColor4uiv = glColor4uiv@4 +- glColor4us = glColor4us@16 +- glColor4usv = glColor4usv@4 +- glColorMask = glColorMask@16 +- glColorMaterial = glColorMaterial@8 +- glColorPointer = glColorPointer@16 +- glCopyPixels = glCopyPixels@20 +- glCopyTexImage1D = glCopyTexImage1D@28 +- glCopyTexImage2D = glCopyTexImage2D@32 +- glCopyTexSubImage1D = glCopyTexSubImage1D@24 +- glCopyTexSubImage2D = glCopyTexSubImage2D@32 +- glCullFace = glCullFace@4 +-; glDebugEntry = glDebugEntry@8 +- glDeleteLists = glDeleteLists@8 +- glDeleteTextures = glDeleteTextures@8 +- glDepthFunc = glDepthFunc@4 +- glDepthMask = glDepthMask@4 +- glDepthRange = glDepthRange@16 +- glDisable = glDisable@4 +- glDisableClientState = glDisableClientState@4 +- glDrawArrays = glDrawArrays@12 +- glDrawBuffer = glDrawBuffer@4 +- glDrawElements = glDrawElements@16 +- glDrawPixels = glDrawPixels@20 +- glEdgeFlag = glEdgeFlag@4 +- glEdgeFlagPointer = glEdgeFlagPointer@8 +- glEdgeFlagv = glEdgeFlagv@4 +- glEnable = glEnable@4 +- glEnableClientState = glEnableClientState@4 +- glEnd = glEnd@0 +- glEndList = glEndList@0 +- glEvalCoord1d = glEvalCoord1d@8 +- glEvalCoord1dv = glEvalCoord1dv@4 +- glEvalCoord1f = glEvalCoord1f@4 +- glEvalCoord1fv = glEvalCoord1fv@4 +- glEvalCoord2d = glEvalCoord2d@16 +- glEvalCoord2dv = glEvalCoord2dv@4 +- glEvalCoord2f = glEvalCoord2f@8 +- glEvalCoord2fv = glEvalCoord2fv@4 +- glEvalMesh1 = glEvalMesh1@12 +- glEvalMesh2 = glEvalMesh2@20 +- glEvalPoint1 = glEvalPoint1@4 +- glEvalPoint2 = glEvalPoint2@8 +- glFeedbackBuffer = glFeedbackBuffer@12 +- glFinish = glFinish@0 +- glFlush = glFlush@0 +- glFogf = glFogf@8 +- glFogfv = glFogfv@8 +- glFogi = glFogi@8 +- glFogiv = glFogiv@8 +- glFrontFace = glFrontFace@4 +- glFrustum = glFrustum@48 +- glGenLists = glGenLists@4 +- glGenTextures = glGenTextures@8 +- glGetBooleanv = glGetBooleanv@8 +- glGetClipPlane = glGetClipPlane@8 +- glGetDoublev = glGetDoublev@8 +- glGetError = glGetError@0 +- glGetFloatv = glGetFloatv@8 +- glGetIntegerv = glGetIntegerv@8 +- glGetLightfv = glGetLightfv@12 +- glGetLightiv = glGetLightiv@12 +- glGetMapdv = glGetMapdv@12 +- glGetMapfv = glGetMapfv@12 +- glGetMapiv = glGetMapiv@12 +- glGetMaterialfv = glGetMaterialfv@12 +- glGetMaterialiv = glGetMaterialiv@12 +- glGetPixelMapfv = glGetPixelMapfv@8 +- glGetPixelMapuiv = glGetPixelMapuiv@8 +- glGetPixelMapusv = glGetPixelMapusv@8 +- glGetPointerv = glGetPointerv@8 +- glGetPolygonStipple = glGetPolygonStipple@4 +- glGetString = glGetString@4 +- glGetTexEnvfv = glGetTexEnvfv@12 +- glGetTexEnviv = glGetTexEnviv@12 +- glGetTexGendv = glGetTexGendv@12 +- glGetTexGenfv = glGetTexGenfv@12 +- glGetTexGeniv = glGetTexGeniv@12 +- glGetTexImage = glGetTexImage@20 +- glGetTexLevelParameterfv = glGetTexLevelParameterfv@16 +- glGetTexLevelParameteriv = glGetTexLevelParameteriv@16 +- glGetTexParameterfv = glGetTexParameterfv@12 +- glGetTexParameteriv = glGetTexParameteriv@12 +- glHint = glHint@8 +- glIndexMask = glIndexMask@4 +- glIndexPointer = glIndexPointer@12 +- glIndexd = glIndexd@8 +- glIndexdv = glIndexdv@4 +- glIndexf = glIndexf@4 +- glIndexfv = glIndexfv@4 +- glIndexi = glIndexi@4 +- glIndexiv = glIndexiv@4 +- glIndexs = glIndexs@4 +- glIndexsv = glIndexsv@4 +- glIndexub = glIndexub@4 +- glIndexubv = glIndexubv@4 +- glInitNames = glInitNames@0 +- glInterleavedArrays = glInterleavedArrays@12 +- glIsEnabled = glIsEnabled@4 +- glIsList = glIsList@4 +- glIsTexture = glIsTexture@4 +- glLightModelf = glLightModelf@8 +- glLightModelfv = glLightModelfv@8 +- glLightModeli = glLightModeli@8 +- glLightModeliv = glLightModeliv@8 +- glLightf = glLightf@12 +- glLightfv = glLightfv@12 +- glLighti = glLighti@12 +- glLightiv = glLightiv@12 +- glLineStipple = glLineStipple@8 +- glLineWidth = glLineWidth@4 +- glListBase = glListBase@4 +- glLoadIdentity = glLoadIdentity@0 +- glLoadMatrixd = glLoadMatrixd@4 +- glLoadMatrixf = glLoadMatrixf@4 +- glLoadName = glLoadName@4 +- glLogicOp = glLogicOp@4 +- glMap1d = glMap1d@32 +- glMap1f = glMap1f@24 +- glMap2d = glMap2d@56 +- glMap2f = glMap2f@40 +- glMapGrid1d = glMapGrid1d@20 +- glMapGrid1f = glMapGrid1f@12 +- glMapGrid2d = glMapGrid2d@40 +- glMapGrid2f = glMapGrid2f@24 +- glMaterialf = glMaterialf@12 +- glMaterialfv = glMaterialfv@12 +- glMateriali = glMateriali@12 +- glMaterialiv = glMaterialiv@12 +- glMatrixMode = glMatrixMode@4 +- glMultMatrixd = glMultMatrixd@4 +- glMultMatrixf = glMultMatrixf@4 +- glNewList = glNewList@8 +- glNormal3b = glNormal3b@12 +- glNormal3bv = glNormal3bv@4 +- glNormal3d = glNormal3d@24 +- glNormal3dv = glNormal3dv@4 +- glNormal3f = glNormal3f@12 +- glNormal3fv = glNormal3fv@4 +- glNormal3i = glNormal3i@12 +- glNormal3iv = glNormal3iv@4 +- glNormal3s = glNormal3s@12 +- glNormal3sv = glNormal3sv@4 +- glNormalPointer = glNormalPointer@12 +- glOrtho = glOrtho@48 +- glPassThrough = glPassThrough@4 +- glPixelMapfv = glPixelMapfv@12 +- glPixelMapuiv = glPixelMapuiv@12 +- glPixelMapusv = glPixelMapusv@12 +- glPixelStoref = glPixelStoref@8 +- glPixelStorei = glPixelStorei@8 +- glPixelTransferf = glPixelTransferf@8 +- glPixelTransferi = glPixelTransferi@8 +- glPixelZoom = glPixelZoom@8 +- glPointSize = glPointSize@4 +- glPolygonMode = glPolygonMode@8 +- glPolygonOffset = glPolygonOffset@8 +- glPolygonStipple = glPolygonStipple@4 +- glPopAttrib = glPopAttrib@0 +- glPopClientAttrib = glPopClientAttrib@0 +- glPopMatrix = glPopMatrix@0 +- glPopName = glPopName@0 +- glPrioritizeTextures = glPrioritizeTextures@12 +- glPushAttrib = glPushAttrib@4 +- glPushClientAttrib = glPushClientAttrib@4 +- glPushMatrix = glPushMatrix@0 +- glPushName = glPushName@4 +- glRasterPos2d = glRasterPos2d@16 +- glRasterPos2dv = glRasterPos2dv@4 +- glRasterPos2f = glRasterPos2f@8 +- glRasterPos2fv = glRasterPos2fv@4 +- glRasterPos2i = glRasterPos2i@8 +- glRasterPos2iv = glRasterPos2iv@4 +- glRasterPos2s = glRasterPos2s@8 +- glRasterPos2sv = glRasterPos2sv@4 +- glRasterPos3d = glRasterPos3d@24 +- glRasterPos3dv = glRasterPos3dv@4 +- glRasterPos3f = glRasterPos3f@12 +- glRasterPos3fv = glRasterPos3fv@4 +- glRasterPos3i = glRasterPos3i@12 +- glRasterPos3iv = glRasterPos3iv@4 +- glRasterPos3s = glRasterPos3s@12 +- glRasterPos3sv = glRasterPos3sv@4 +- glRasterPos4d = glRasterPos4d@32 +- glRasterPos4dv = glRasterPos4dv@4 +- glRasterPos4f = glRasterPos4f@16 +- glRasterPos4fv = glRasterPos4fv@4 +- glRasterPos4i = glRasterPos4i@16 +- glRasterPos4iv = glRasterPos4iv@4 +- glRasterPos4s = glRasterPos4s@16 +- glRasterPos4sv = glRasterPos4sv@4 +- glReadBuffer = glReadBuffer@4 +- glReadPixels = glReadPixels@28 +- glRectd = glRectd@32 +- glRectdv = glRectdv@8 +- glRectf = glRectf@16 +- glRectfv = glRectfv@8 +- glRecti = glRecti@16 +- glRectiv = glRectiv@8 +- glRects = glRects@16 +- glRectsv = glRectsv@8 +- glRenderMode = glRenderMode@4 +- glRotated = glRotated@32 +- glRotatef = glRotatef@16 +- glScaled = glScaled@24 +- glScalef = glScalef@12 +- glScissor = glScissor@16 +- glSelectBuffer = glSelectBuffer@8 +- glShadeModel = glShadeModel@4 +- glStencilFunc = glStencilFunc@12 +- glStencilMask = glStencilMask@4 +- glStencilOp = glStencilOp@12 +- glTexCoord1d = glTexCoord1d@8 +- glTexCoord1dv = glTexCoord1dv@4 +- glTexCoord1f = glTexCoord1f@4 +- glTexCoord1fv = glTexCoord1fv@4 +- glTexCoord1i = glTexCoord1i@4 +- glTexCoord1iv = glTexCoord1iv@4 +- glTexCoord1s = glTexCoord1s@4 +- glTexCoord1sv = glTexCoord1sv@4 +- glTexCoord2d = glTexCoord2d@16 +- glTexCoord2dv = glTexCoord2dv@4 +- glTexCoord2f = glTexCoord2f@8 +- glTexCoord2fv = glTexCoord2fv@4 +- glTexCoord2i = glTexCoord2i@8 +- glTexCoord2iv = glTexCoord2iv@4 +- glTexCoord2s = glTexCoord2s@8 +- glTexCoord2sv = glTexCoord2sv@4 +- glTexCoord3d = glTexCoord3d@24 +- glTexCoord3dv = glTexCoord3dv@4 +- glTexCoord3f = glTexCoord3f@12 +- glTexCoord3fv = glTexCoord3fv@4 +- glTexCoord3i = glTexCoord3i@12 +- glTexCoord3iv = glTexCoord3iv@4 +- glTexCoord3s = glTexCoord3s@12 +- glTexCoord3sv = glTexCoord3sv@4 +- glTexCoord4d = glTexCoord4d@32 +- glTexCoord4dv = glTexCoord4dv@4 +- glTexCoord4f = glTexCoord4f@16 +- glTexCoord4fv = glTexCoord4fv@4 +- glTexCoord4i = glTexCoord4i@16 +- glTexCoord4iv = glTexCoord4iv@4 +- glTexCoord4s = glTexCoord4s@16 +- glTexCoord4sv = glTexCoord4sv@4 +- glTexCoordPointer = glTexCoordPointer@16 +- glTexEnvf = glTexEnvf@12 +- glTexEnvfv = glTexEnvfv@12 +- glTexEnvi = glTexEnvi@12 +- glTexEnviv = glTexEnviv@12 +- glTexGend = glTexGend@16 +- glTexGendv = glTexGendv@12 +- glTexGenf = glTexGenf@12 +- glTexGenfv = glTexGenfv@12 +- glTexGeni = glTexGeni@12 +- glTexGeniv = glTexGeniv@12 +- glTexImage1D = glTexImage1D@32 +- glTexImage2D = glTexImage2D@36 +- glTexParameterf = glTexParameterf@12 +- glTexParameterfv = glTexParameterfv@12 +- glTexParameteri = glTexParameteri@12 +- glTexParameteriv = glTexParameteriv@12 +- glTexSubImage1D = glTexSubImage1D@28 +- glTexSubImage2D = glTexSubImage2D@36 +- glTranslated = glTranslated@24 +- glTranslatef = glTranslatef@12 +- glVertex2d = glVertex2d@16 +- glVertex2dv = glVertex2dv@4 +- glVertex2f = glVertex2f@8 +- glVertex2fv = glVertex2fv@4 +- glVertex2i = glVertex2i@8 +- glVertex2iv = glVertex2iv@4 +- glVertex2s = glVertex2s@8 +- glVertex2sv = glVertex2sv@4 +- glVertex3d = glVertex3d@24 +- glVertex3dv = glVertex3dv@4 +- glVertex3f = glVertex3f@12 +- glVertex3fv = glVertex3fv@4 +- glVertex3i = glVertex3i@12 +- glVertex3iv = glVertex3iv@4 +- glVertex3s = glVertex3s@12 +- glVertex3sv = glVertex3sv@4 +- glVertex4d = glVertex4d@32 +- glVertex4dv = glVertex4dv@4 +- glVertex4f = glVertex4f@16 +- glVertex4fv = glVertex4fv@4 +- glVertex4i = glVertex4i@16 +- glVertex4iv = glVertex4iv@4 +- glVertex4s = glVertex4s@16 +- glVertex4sv = glVertex4sv@4 +- glVertexPointer = glVertexPointer@16 +- glViewport = glViewport@16 +- DrvCopyContext +- DrvCreateContext +- DrvCreateLayerContext +- DrvDeleteContext +- DrvDescribeLayerPlane +- DrvDescribePixelFormat +- DrvGetLayerPaletteEntries +- DrvGetProcAddress +- DrvPresentBuffers +- DrvRealizeLayerPalette +- DrvReleaseContext +- DrvSetCallbackProcs +- DrvSetContext +- DrvSetLayerPaletteEntries +- DrvSetPixelFormat +- DrvShareLists +- DrvSwapBuffers +- DrvSwapLayerBuffers +- DrvValidateVersion +diff --git a/src/gallium/targets/osmesa/meson.build b/src/gallium/targets/osmesa/meson.build +index 38fcaca13b9513d7d69122f3f3734330697695f4..97a9fd954ac61fb6945217e193eb9f1eaab5c590 100644 +--- a/src/gallium/targets/osmesa/meson.build ++++ b/src/gallium/targets/osmesa/meson.build +@@ -32,11 +32,14 @@ if with_ld_version_script + osmesa_link_deps += files('osmesa.sym') + endif + +-if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64' +- osmesa_def = 'osmesa.mingw.def' +-else +- osmesa_def = 'osmesa.def' +-endif ++osmesa_def = custom_target( ++ 'osmesa.def', ++ input: 'osmesa.def.in', ++ output : 'osmesa.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) + + libosmesa = shared_library( + osmesa_lib_name, +diff --git a/src/gallium/targets/osmesa/osmesa.def b/src/gallium/targets/osmesa/osmesa.def +deleted file mode 100644 +index f6d09b81ef8c42463f8b3a67ac0ced2525b0599a..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/osmesa/osmesa.def ++++ /dev/null +@@ -1,354 +0,0 @@ +-;DESCRIPTION 'Mesa OSMesa lib for Win32' +-VERSION 4.1 +- +-EXPORTS +- OSMesaCreateContext +- OSMesaCreateContextAttribs +- OSMesaCreateContextExt +- OSMesaDestroyContext +- OSMesaMakeCurrent +- OSMesaGetCurrentContext +- OSMesaPixelStore +- OSMesaGetIntegerv +- OSMesaGetDepthBuffer +- OSMesaGetColorBuffer +- OSMesaGetProcAddress +- OSMesaColorClamp +- OSMesaPostprocess +- glAccum +- glAlphaFunc +- glAreTexturesResident +- glArrayElement +- glBegin +- glBindTexture +- glBitmap +- glBlendFunc +- glCallList +- glCallLists +- glClear +- glClearAccum +- glClearColor +- glClearDepth +- glClearIndex +- glClearStencil +- glClipPlane +- glColor3b +- glColor3bv +- glColor3d +- glColor3dv +- glColor3f +- glColor3fv +- glColor3i +- glColor3iv +- glColor3s +- glColor3sv +- glColor3ub +- glColor3ubv +- glColor3ui +- glColor3uiv +- glColor3us +- glColor3usv +- glColor4b +- glColor4bv +- glColor4d +- glColor4dv +- glColor4f +- glColor4fv +- glColor4i +- glColor4iv +- glColor4s +- glColor4sv +- glColor4ub +- glColor4ubv +- glColor4ui +- glColor4uiv +- glColor4us +- glColor4usv +- glColorMask +- glColorMaterial +- glColorPointer +- glCopyPixels +- glCopyTexImage1D +- glCopyTexImage2D +- glCopyTexSubImage1D +- glCopyTexSubImage2D +- glCullFace +-; glDebugEntry +- glDeleteLists +- glDeleteTextures +- glDepthFunc +- glDepthMask +- glDepthRange +- glDisable +- glDisableClientState +- glDrawArrays +- glDrawBuffer +- glDrawElements +- glDrawPixels +- glEdgeFlag +- glEdgeFlagPointer +- glEdgeFlagv +- glEnable +- glEnableClientState +- glEnd +- glEndList +- glEvalCoord1d +- glEvalCoord1dv +- glEvalCoord1f +- glEvalCoord1fv +- glEvalCoord2d +- glEvalCoord2dv +- glEvalCoord2f +- glEvalCoord2fv +- glEvalMesh1 +- glEvalMesh2 +- glEvalPoint1 +- glEvalPoint2 +- glFeedbackBuffer +- glFinish +- glFlush +- glFogf +- glFogfv +- glFogi +- glFogiv +- glFrontFace +- glFrustum +- glGenLists +- glGenTextures +- glGetBooleanv +- glGetClipPlane +- glGetDoublev +- glGetError +- glGetFloatv +- glGetIntegerv +- glGetLightfv +- glGetLightiv +- glGetMapdv +- glGetMapfv +- glGetMapiv +- glGetMaterialfv +- glGetMaterialiv +- glGetPixelMapfv +- glGetPixelMapuiv +- glGetPixelMapusv +- glGetPointerv +- glGetPolygonStipple +- glGetString +- glGetTexEnvfv +- glGetTexEnviv +- glGetTexGendv +- glGetTexGenfv +- glGetTexGeniv +- glGetTexImage +- glGetTexLevelParameterfv +- glGetTexLevelParameteriv +- glGetTexParameterfv +- glGetTexParameteriv +- glHint +- glIndexMask +- glIndexPointer +- glIndexd +- glIndexdv +- glIndexf +- glIndexfv +- glIndexi +- glIndexiv +- glIndexs +- glIndexsv +- glIndexub +- glIndexubv +- glInitNames +- glInterleavedArrays +- glIsEnabled +- glIsList +- glIsTexture +- glLightModelf +- glLightModelfv +- glLightModeli +- glLightModeliv +- glLightf +- glLightfv +- glLighti +- glLightiv +- glLineStipple +- glLineWidth +- glListBase +- glLoadIdentity +- glLoadMatrixd +- glLoadMatrixf +- glLoadName +- glLogicOp +- glMap1d +- glMap1f +- glMap2d +- glMap2f +- glMapGrid1d +- glMapGrid1f +- glMapGrid2d +- glMapGrid2f +- glMaterialf +- glMaterialfv +- glMateriali +- glMaterialiv +- glMatrixMode +- glMultMatrixd +- glMultMatrixf +- glNewList +- glNormal3b +- glNormal3bv +- glNormal3d +- glNormal3dv +- glNormal3f +- glNormal3fv +- glNormal3i +- glNormal3iv +- glNormal3s +- glNormal3sv +- glNormalPointer +- glOrtho +- glPassThrough +- glPixelMapfv +- glPixelMapuiv +- glPixelMapusv +- glPixelStoref +- glPixelStorei +- glPixelTransferf +- glPixelTransferi +- glPixelZoom +- glPointSize +- glPolygonMode +- glPolygonOffset +- glPolygonStipple +- glPopAttrib +- glPopClientAttrib +- glPopMatrix +- glPopName +- glPrioritizeTextures +- glPushAttrib +- glPushClientAttrib +- glPushMatrix +- glPushName +- glRasterPos2d +- glRasterPos2dv +- glRasterPos2f +- glRasterPos2fv +- glRasterPos2i +- glRasterPos2iv +- glRasterPos2s +- glRasterPos2sv +- glRasterPos3d +- glRasterPos3dv +- glRasterPos3f +- glRasterPos3fv +- glRasterPos3i +- glRasterPos3iv +- glRasterPos3s +- glRasterPos3sv +- glRasterPos4d +- glRasterPos4dv +- glRasterPos4f +- glRasterPos4fv +- glRasterPos4i +- glRasterPos4iv +- glRasterPos4s +- glRasterPos4sv +- glReadBuffer +- glReadPixels +- glRectd +- glRectdv +- glRectf +- glRectfv +- glRecti +- glRectiv +- glRects +- glRectsv +- glRenderMode +- glRotated +- glRotatef +- glScaled +- glScalef +- glScissor +- glSelectBuffer +- glShadeModel +- glStencilFunc +- glStencilMask +- glStencilOp +- glTexCoord1d +- glTexCoord1dv +- glTexCoord1f +- glTexCoord1fv +- glTexCoord1i +- glTexCoord1iv +- glTexCoord1s +- glTexCoord1sv +- glTexCoord2d +- glTexCoord2dv +- glTexCoord2f +- glTexCoord2fv +- glTexCoord2i +- glTexCoord2iv +- glTexCoord2s +- glTexCoord2sv +- glTexCoord3d +- glTexCoord3dv +- glTexCoord3f +- glTexCoord3fv +- glTexCoord3i +- glTexCoord3iv +- glTexCoord3s +- glTexCoord3sv +- glTexCoord4d +- glTexCoord4dv +- glTexCoord4f +- glTexCoord4fv +- glTexCoord4i +- glTexCoord4iv +- glTexCoord4s +- glTexCoord4sv +- glTexCoordPointer +- glTexEnvf +- glTexEnvfv +- glTexEnvi +- glTexEnviv +- glTexGend +- glTexGendv +- glTexGenf +- glTexGenfv +- glTexGeni +- glTexGeniv +- glTexImage1D +- glTexImage2D +- glTexParameterf +- glTexParameterfv +- glTexParameteri +- glTexParameteriv +- glTexSubImage1D +- glTexSubImage2D +- glTranslated +- glTranslatef +- glVertex2d +- glVertex2dv +- glVertex2f +- glVertex2fv +- glVertex2i +- glVertex2iv +- glVertex2s +- glVertex2sv +- glVertex3d +- glVertex3dv +- glVertex3f +- glVertex3fv +- glVertex3i +- glVertex3iv +- glVertex3s +- glVertex3sv +- glVertex4d +- glVertex4dv +- glVertex4f +- glVertex4fv +- glVertex4i +- glVertex4iv +- glVertex4s +- glVertex4sv +- glVertexPointer +- glViewport +diff --git a/src/gallium/targets/osmesa/osmesa.def.in b/src/gallium/targets/osmesa/osmesa.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..d60457797963451ff3fd4f13690d1bab971bc5b3 +--- /dev/null ++++ b/src/gallium/targets/osmesa/osmesa.def.in +@@ -0,0 +1,353 @@ ++; Mesa OSMesa lib for Win32 ++ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++OSMesaCreateContext@8 ++OSMesaCreateContextAttribs@8 ++OSMesaCreateContextExt@20 ++OSMesaDestroyContext@4 ++OSMesaMakeCurrent@20 ++OSMesaGetCurrentContext@0 ++OSMesaPixelStore@8 ++OSMesaGetIntegerv@8 ++OSMesaGetDepthBuffer@20 ++OSMesaGetColorBuffer@20 ++OSMesaGetProcAddress@4 ++OSMesaColorClamp@4 ++OSMesaPostprocess@12 ++glAccum@8 ++glAlphaFunc@8 ++glAreTexturesResident@12 ++glArrayElement@4 ++glBegin@4 ++glBindTexture@8 ++glBitmap@28 ++glBlendFunc@8 ++glCallList@4 ++glCallLists@12 ++glClear@4 ++glClearAccum@16 ++glClearColor@16 ++glClearDepth@8 ++glClearIndex@4 ++glClearStencil@4 ++glClipPlane@8 ++glColor3b@12 ++glColor3bv@4 ++glColor3d@24 ++glColor3dv@4 ++glColor3f@12 ++glColor3fv@4 ++glColor3i@12 ++glColor3iv@4 ++glColor3s@12 ++glColor3sv@4 ++glColor3ub@12 ++glColor3ubv@4 ++glColor3ui@12 ++glColor3uiv@4 ++glColor3us@12 ++glColor3usv@4 ++glColor4b@16 ++glColor4bv@4 ++glColor4d@32 ++glColor4dv@4 ++glColor4f@16 ++glColor4fv@4 ++glColor4i@16 ++glColor4iv@4 ++glColor4s@16 ++glColor4sv@4 ++glColor4ub@16 ++glColor4ubv@4 ++glColor4ui@16 ++glColor4uiv@4 ++glColor4us@16 ++glColor4usv@4 ++glColorMask@16 ++glColorMaterial@8 ++glColorPointer@16 ++glCopyPixels@20 ++glCopyTexImage1D@28 ++glCopyTexImage2D@32 ++glCopyTexSubImage1D@24 ++glCopyTexSubImage2D@32 ++glCullFace@4 ++;glDebugEntry@8 ++glDeleteLists@8 ++glDeleteTextures@8 ++glDepthFunc@4 ++glDepthMask@4 ++glDepthRange@16 ++glDisable@4 ++glDisableClientState@4 ++glDrawArrays@12 ++glDrawBuffer@4 ++glDrawElements@16 ++glDrawPixels@20 ++glEdgeFlag@4 ++glEdgeFlagPointer@8 ++glEdgeFlagv@4 ++glEnable@4 ++glEnableClientState@4 ++glEnd@0 ++glEndList@0 ++glEvalCoord1d@8 ++glEvalCoord1dv@4 ++glEvalCoord1f@4 ++glEvalCoord1fv@4 ++glEvalCoord2d@16 ++glEvalCoord2dv@4 ++glEvalCoord2f@8 ++glEvalCoord2fv@4 ++glEvalMesh1@12 ++glEvalMesh2@20 ++glEvalPoint1@4 ++glEvalPoint2@8 ++glFeedbackBuffer@12 ++glFinish@0 ++glFlush@0 ++glFogf@8 ++glFogfv@8 ++glFogi@8 ++glFogiv@8 ++glFrontFace@4 ++glFrustum@48 ++glGenLists@4 ++glGenTextures@8 ++glGetBooleanv@8 ++glGetClipPlane@8 ++glGetDoublev@8 ++glGetError@0 ++glGetFloatv@8 ++glGetIntegerv@8 ++glGetLightfv@12 ++glGetLightiv@12 ++glGetMapdv@12 ++glGetMapfv@12 ++glGetMapiv@12 ++glGetMaterialfv@12 ++glGetMaterialiv@12 ++glGetPixelMapfv@8 ++glGetPixelMapuiv@8 ++glGetPixelMapusv@8 ++glGetPointerv@8 ++glGetPolygonStipple@4 ++glGetString@4 ++glGetTexEnvfv@12 ++glGetTexEnviv@12 ++glGetTexGendv@12 ++glGetTexGenfv@12 ++glGetTexGeniv@12 ++glGetTexImage@20 ++glGetTexLevelParameterfv@16 ++glGetTexLevelParameteriv@16 ++glGetTexParameterfv@12 ++glGetTexParameteriv@12 ++glHint@8 ++glIndexMask@4 ++glIndexPointer@12 ++glIndexd@8 ++glIndexdv@4 ++glIndexf@4 ++glIndexfv@4 ++glIndexi@4 ++glIndexiv@4 ++glIndexs@4 ++glIndexsv@4 ++glIndexub@4 ++glIndexubv@4 ++glInitNames@0 ++glInterleavedArrays@12 ++glIsEnabled@4 ++glIsList@4 ++glIsTexture@4 ++glLightModelf@8 ++glLightModelfv@8 ++glLightModeli@8 ++glLightModeliv@8 ++glLightf@12 ++glLightfv@12 ++glLighti@12 ++glLightiv@12 ++glLineStipple@8 ++glLineWidth@4 ++glListBase@4 ++glLoadIdentity@0 ++glLoadMatrixd@4 ++glLoadMatrixf@4 ++glLoadName@4 ++glLogicOp@4 ++glMap1d@32 ++glMap1f@24 ++glMap2d@56 ++glMap2f@40 ++glMapGrid1d@20 ++glMapGrid1f@12 ++glMapGrid2d@40 ++glMapGrid2f@24 ++glMaterialf@12 ++glMaterialfv@12 ++glMateriali@12 ++glMaterialiv@12 ++glMatrixMode@4 ++glMultMatrixd@4 ++glMultMatrixf@4 ++glNewList@8 ++glNormal3b@12 ++glNormal3bv@4 ++glNormal3d@24 ++glNormal3dv@4 ++glNormal3f@12 ++glNormal3fv@4 ++glNormal3i@12 ++glNormal3iv@4 ++glNormal3s@12 ++glNormal3sv@4 ++glNormalPointer@12 ++glOrtho@48 ++glPassThrough@4 ++glPixelMapfv@12 ++glPixelMapuiv@12 ++glPixelMapusv@12 ++glPixelStoref@8 ++glPixelStorei@8 ++glPixelTransferf@8 ++glPixelTransferi@8 ++glPixelZoom@8 ++glPointSize@4 ++glPolygonMode@8 ++glPolygonOffset@8 ++glPolygonStipple@4 ++glPopAttrib@0 ++glPopClientAttrib@0 ++glPopMatrix@0 ++glPopName@0 ++glPrioritizeTextures@12 ++glPushAttrib@4 ++glPushClientAttrib@4 ++glPushMatrix@0 ++glPushName@4 ++glRasterPos2d@16 ++glRasterPos2dv@4 ++glRasterPos2f@8 ++glRasterPos2fv@4 ++glRasterPos2i@8 ++glRasterPos2iv@4 ++glRasterPos2s@8 ++glRasterPos2sv@4 ++glRasterPos3d@24 ++glRasterPos3dv@4 ++glRasterPos3f@12 ++glRasterPos3fv@4 ++glRasterPos3i@12 ++glRasterPos3iv@4 ++glRasterPos3s@12 ++glRasterPos3sv@4 ++glRasterPos4d@32 ++glRasterPos4dv@4 ++glRasterPos4f@16 ++glRasterPos4fv@4 ++glRasterPos4i@16 ++glRasterPos4iv@4 ++glRasterPos4s@16 ++glRasterPos4sv@4 ++glReadBuffer@4 ++glReadPixels@28 ++glRectd@32 ++glRectdv@8 ++glRectf@16 ++glRectfv@8 ++glRecti@16 ++glRectiv@8 ++glRects@16 ++glRectsv@8 ++glRenderMode@4 ++glRotated@32 ++glRotatef@16 ++glScaled@24 ++glScalef@12 ++glScissor@16 ++glSelectBuffer@8 ++glShadeModel@4 ++glStencilFunc@12 ++glStencilMask@4 ++glStencilOp@12 ++glTexCoord1d@8 ++glTexCoord1dv@4 ++glTexCoord1f@4 ++glTexCoord1fv@4 ++glTexCoord1i@4 ++glTexCoord1iv@4 ++glTexCoord1s@4 ++glTexCoord1sv@4 ++glTexCoord2d@16 ++glTexCoord2dv@4 ++glTexCoord2f@8 ++glTexCoord2fv@4 ++glTexCoord2i@8 ++glTexCoord2iv@4 ++glTexCoord2s@8 ++glTexCoord2sv@4 ++glTexCoord3d@24 ++glTexCoord3dv@4 ++glTexCoord3f@12 ++glTexCoord3fv@4 ++glTexCoord3i@12 ++glTexCoord3iv@4 ++glTexCoord3s@12 ++glTexCoord3sv@4 ++glTexCoord4d@32 ++glTexCoord4dv@4 ++glTexCoord4f@16 ++glTexCoord4fv@4 ++glTexCoord4i@16 ++glTexCoord4iv@4 ++glTexCoord4s@16 ++glTexCoord4sv@4 ++glTexCoordPointer@16 ++glTexEnvf@12 ++glTexEnvfv@12 ++glTexEnvi@12 ++glTexEnviv@12 ++glTexGend@16 ++glTexGendv@12 ++glTexGenf@12 ++glTexGenfv@12 ++glTexGeni@12 ++glTexGeniv@12 ++glTexImage1D@32 ++glTexImage2D@36 ++glTexParameterf@12 ++glTexParameterfv@12 ++glTexParameteri@12 ++glTexParameteriv@12 ++glTexSubImage1D@28 ++glTexSubImage2D@36 ++glTranslated@24 ++glTranslatef@12 ++glVertex2d@16 ++glVertex2dv@4 ++glVertex2f@8 ++glVertex2fv@4 ++glVertex2i@8 ++glVertex2iv@4 ++glVertex2s@8 ++glVertex2sv@4 ++glVertex3d@24 ++glVertex3dv@4 ++glVertex3f@12 ++glVertex3fv@4 ++glVertex3i@12 ++glVertex3iv@4 ++glVertex3s@12 ++glVertex3sv@4 ++glVertex4d@32 ++glVertex4dv@4 ++glVertex4f@16 ++glVertex4fv@4 ++glVertex4i@16 ++glVertex4iv@4 ++glVertex4s@16 ++glVertex4sv@4 ++glVertexPointer@16 ++glViewport@16 +diff --git a/src/gallium/targets/osmesa/osmesa.mingw.def b/src/gallium/targets/osmesa/osmesa.mingw.def +deleted file mode 100644 +index b77af60a93f2fcf9c73262993d6d204563e3eeae..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/osmesa/osmesa.mingw.def ++++ /dev/null +@@ -1,351 +0,0 @@ +-EXPORTS +- OSMesaCreateContext = OSMesaCreateContext@8 +- OSMesaCreateContextAttribs = OSMesaCreateContextAttribs@8 +- OSMesaCreateContextExt = OSMesaCreateContextExt@20 +- OSMesaDestroyContext = OSMesaDestroyContext@4 +- OSMesaMakeCurrent = OSMesaMakeCurrent@20 +- OSMesaGetCurrentContext = OSMesaGetCurrentContext@0 +- OSMesaPixelStore = OSMesaPixelStore@8 +- OSMesaGetIntegerv = OSMesaGetIntegerv@8 +- OSMesaGetDepthBuffer = OSMesaGetDepthBuffer@20 +- OSMesaGetColorBuffer = OSMesaGetColorBuffer@20 +- OSMesaGetProcAddress = OSMesaGetProcAddress@4 +- OSMesaColorClamp = OSMesaColorClamp@4 +- OSMesaPostprocess = OSMesaPostprocess@12 +- glAccum = glAccum@8 +- glAlphaFunc = glAlphaFunc@8 +- glAreTexturesResident = glAreTexturesResident@12 +- glArrayElement = glArrayElement@4 +- glBegin = glBegin@4 +- glBindTexture = glBindTexture@8 +- glBitmap = glBitmap@28 +- glBlendFunc = glBlendFunc@8 +- glCallList = glCallList@4 +- glCallLists = glCallLists@12 +- glClear = glClear@4 +- glClearAccum = glClearAccum@16 +- glClearColor = glClearColor@16 +- glClearDepth = glClearDepth@8 +- glClearIndex = glClearIndex@4 +- glClearStencil = glClearStencil@4 +- glClipPlane = glClipPlane@8 +- glColor3b = glColor3b@12 +- glColor3bv = glColor3bv@4 +- glColor3d = glColor3d@24 +- glColor3dv = glColor3dv@4 +- glColor3f = glColor3f@12 +- glColor3fv = glColor3fv@4 +- glColor3i = glColor3i@12 +- glColor3iv = glColor3iv@4 +- glColor3s = glColor3s@12 +- glColor3sv = glColor3sv@4 +- glColor3ub = glColor3ub@12 +- glColor3ubv = glColor3ubv@4 +- glColor3ui = glColor3ui@12 +- glColor3uiv = glColor3uiv@4 +- glColor3us = glColor3us@12 +- glColor3usv = glColor3usv@4 +- glColor4b = glColor4b@16 +- glColor4bv = glColor4bv@4 +- glColor4d = glColor4d@32 +- glColor4dv = glColor4dv@4 +- glColor4f = glColor4f@16 +- glColor4fv = glColor4fv@4 +- glColor4i = glColor4i@16 +- glColor4iv = glColor4iv@4 +- glColor4s = glColor4s@16 +- glColor4sv = glColor4sv@4 +- glColor4ub = glColor4ub@16 +- glColor4ubv = glColor4ubv@4 +- glColor4ui = glColor4ui@16 +- glColor4uiv = glColor4uiv@4 +- glColor4us = glColor4us@16 +- glColor4usv = glColor4usv@4 +- glColorMask = glColorMask@16 +- glColorMaterial = glColorMaterial@8 +- glColorPointer = glColorPointer@16 +- glCopyPixels = glCopyPixels@20 +- glCopyTexImage1D = glCopyTexImage1D@28 +- glCopyTexImage2D = glCopyTexImage2D@32 +- glCopyTexSubImage1D = glCopyTexSubImage1D@24 +- glCopyTexSubImage2D = glCopyTexSubImage2D@32 +- glCullFace = glCullFace@4 +-; glDebugEntry = glDebugEntry@8 +- glDeleteLists = glDeleteLists@8 +- glDeleteTextures = glDeleteTextures@8 +- glDepthFunc = glDepthFunc@4 +- glDepthMask = glDepthMask@4 +- glDepthRange = glDepthRange@16 +- glDisable = glDisable@4 +- glDisableClientState = glDisableClientState@4 +- glDrawArrays = glDrawArrays@12 +- glDrawBuffer = glDrawBuffer@4 +- glDrawElements = glDrawElements@16 +- glDrawPixels = glDrawPixels@20 +- glEdgeFlag = glEdgeFlag@4 +- glEdgeFlagPointer = glEdgeFlagPointer@8 +- glEdgeFlagv = glEdgeFlagv@4 +- glEnable = glEnable@4 +- glEnableClientState = glEnableClientState@4 +- glEnd = glEnd@0 +- glEndList = glEndList@0 +- glEvalCoord1d = glEvalCoord1d@8 +- glEvalCoord1dv = glEvalCoord1dv@4 +- glEvalCoord1f = glEvalCoord1f@4 +- glEvalCoord1fv = glEvalCoord1fv@4 +- glEvalCoord2d = glEvalCoord2d@16 +- glEvalCoord2dv = glEvalCoord2dv@4 +- glEvalCoord2f = glEvalCoord2f@8 +- glEvalCoord2fv = glEvalCoord2fv@4 +- glEvalMesh1 = glEvalMesh1@12 +- glEvalMesh2 = glEvalMesh2@20 +- glEvalPoint1 = glEvalPoint1@4 +- glEvalPoint2 = glEvalPoint2@8 +- glFeedbackBuffer = glFeedbackBuffer@12 +- glFinish = glFinish@0 +- glFlush = glFlush@0 +- glFogf = glFogf@8 +- glFogfv = glFogfv@8 +- glFogi = glFogi@8 +- glFogiv = glFogiv@8 +- glFrontFace = glFrontFace@4 +- glFrustum = glFrustum@48 +- glGenLists = glGenLists@4 +- glGenTextures = glGenTextures@8 +- glGetBooleanv = glGetBooleanv@8 +- glGetClipPlane = glGetClipPlane@8 +- glGetDoublev = glGetDoublev@8 +- glGetError = glGetError@0 +- glGetFloatv = glGetFloatv@8 +- glGetIntegerv = glGetIntegerv@8 +- glGetLightfv = glGetLightfv@12 +- glGetLightiv = glGetLightiv@12 +- glGetMapdv = glGetMapdv@12 +- glGetMapfv = glGetMapfv@12 +- glGetMapiv = glGetMapiv@12 +- glGetMaterialfv = glGetMaterialfv@12 +- glGetMaterialiv = glGetMaterialiv@12 +- glGetPixelMapfv = glGetPixelMapfv@8 +- glGetPixelMapuiv = glGetPixelMapuiv@8 +- glGetPixelMapusv = glGetPixelMapusv@8 +- glGetPointerv = glGetPointerv@8 +- glGetPolygonStipple = glGetPolygonStipple@4 +- glGetString = glGetString@4 +- glGetTexEnvfv = glGetTexEnvfv@12 +- glGetTexEnviv = glGetTexEnviv@12 +- glGetTexGendv = glGetTexGendv@12 +- glGetTexGenfv = glGetTexGenfv@12 +- glGetTexGeniv = glGetTexGeniv@12 +- glGetTexImage = glGetTexImage@20 +- glGetTexLevelParameterfv = glGetTexLevelParameterfv@16 +- glGetTexLevelParameteriv = glGetTexLevelParameteriv@16 +- glGetTexParameterfv = glGetTexParameterfv@12 +- glGetTexParameteriv = glGetTexParameteriv@12 +- glHint = glHint@8 +- glIndexMask = glIndexMask@4 +- glIndexPointer = glIndexPointer@12 +- glIndexd = glIndexd@8 +- glIndexdv = glIndexdv@4 +- glIndexf = glIndexf@4 +- glIndexfv = glIndexfv@4 +- glIndexi = glIndexi@4 +- glIndexiv = glIndexiv@4 +- glIndexs = glIndexs@4 +- glIndexsv = glIndexsv@4 +- glIndexub = glIndexub@4 +- glIndexubv = glIndexubv@4 +- glInitNames = glInitNames@0 +- glInterleavedArrays = glInterleavedArrays@12 +- glIsEnabled = glIsEnabled@4 +- glIsList = glIsList@4 +- glIsTexture = glIsTexture@4 +- glLightModelf = glLightModelf@8 +- glLightModelfv = glLightModelfv@8 +- glLightModeli = glLightModeli@8 +- glLightModeliv = glLightModeliv@8 +- glLightf = glLightf@12 +- glLightfv = glLightfv@12 +- glLighti = glLighti@12 +- glLightiv = glLightiv@12 +- glLineStipple = glLineStipple@8 +- glLineWidth = glLineWidth@4 +- glListBase = glListBase@4 +- glLoadIdentity = glLoadIdentity@0 +- glLoadMatrixd = glLoadMatrixd@4 +- glLoadMatrixf = glLoadMatrixf@4 +- glLoadName = glLoadName@4 +- glLogicOp = glLogicOp@4 +- glMap1d = glMap1d@32 +- glMap1f = glMap1f@24 +- glMap2d = glMap2d@56 +- glMap2f = glMap2f@40 +- glMapGrid1d = glMapGrid1d@20 +- glMapGrid1f = glMapGrid1f@12 +- glMapGrid2d = glMapGrid2d@40 +- glMapGrid2f = glMapGrid2f@24 +- glMaterialf = glMaterialf@12 +- glMaterialfv = glMaterialfv@12 +- glMateriali = glMateriali@12 +- glMaterialiv = glMaterialiv@12 +- glMatrixMode = glMatrixMode@4 +- glMultMatrixd = glMultMatrixd@4 +- glMultMatrixf = glMultMatrixf@4 +- glNewList = glNewList@8 +- glNormal3b = glNormal3b@12 +- glNormal3bv = glNormal3bv@4 +- glNormal3d = glNormal3d@24 +- glNormal3dv = glNormal3dv@4 +- glNormal3f = glNormal3f@12 +- glNormal3fv = glNormal3fv@4 +- glNormal3i = glNormal3i@12 +- glNormal3iv = glNormal3iv@4 +- glNormal3s = glNormal3s@12 +- glNormal3sv = glNormal3sv@4 +- glNormalPointer = glNormalPointer@12 +- glOrtho = glOrtho@48 +- glPassThrough = glPassThrough@4 +- glPixelMapfv = glPixelMapfv@12 +- glPixelMapuiv = glPixelMapuiv@12 +- glPixelMapusv = glPixelMapusv@12 +- glPixelStoref = glPixelStoref@8 +- glPixelStorei = glPixelStorei@8 +- glPixelTransferf = glPixelTransferf@8 +- glPixelTransferi = glPixelTransferi@8 +- glPixelZoom = glPixelZoom@8 +- glPointSize = glPointSize@4 +- glPolygonMode = glPolygonMode@8 +- glPolygonOffset = glPolygonOffset@8 +- glPolygonStipple = glPolygonStipple@4 +- glPopAttrib = glPopAttrib@0 +- glPopClientAttrib = glPopClientAttrib@0 +- glPopMatrix = glPopMatrix@0 +- glPopName = glPopName@0 +- glPrioritizeTextures = glPrioritizeTextures@12 +- glPushAttrib = glPushAttrib@4 +- glPushClientAttrib = glPushClientAttrib@4 +- glPushMatrix = glPushMatrix@0 +- glPushName = glPushName@4 +- glRasterPos2d = glRasterPos2d@16 +- glRasterPos2dv = glRasterPos2dv@4 +- glRasterPos2f = glRasterPos2f@8 +- glRasterPos2fv = glRasterPos2fv@4 +- glRasterPos2i = glRasterPos2i@8 +- glRasterPos2iv = glRasterPos2iv@4 +- glRasterPos2s = glRasterPos2s@8 +- glRasterPos2sv = glRasterPos2sv@4 +- glRasterPos3d = glRasterPos3d@24 +- glRasterPos3dv = glRasterPos3dv@4 +- glRasterPos3f = glRasterPos3f@12 +- glRasterPos3fv = glRasterPos3fv@4 +- glRasterPos3i = glRasterPos3i@12 +- glRasterPos3iv = glRasterPos3iv@4 +- glRasterPos3s = glRasterPos3s@12 +- glRasterPos3sv = glRasterPos3sv@4 +- glRasterPos4d = glRasterPos4d@32 +- glRasterPos4dv = glRasterPos4dv@4 +- glRasterPos4f = glRasterPos4f@16 +- glRasterPos4fv = glRasterPos4fv@4 +- glRasterPos4i = glRasterPos4i@16 +- glRasterPos4iv = glRasterPos4iv@4 +- glRasterPos4s = glRasterPos4s@16 +- glRasterPos4sv = glRasterPos4sv@4 +- glReadBuffer = glReadBuffer@4 +- glReadPixels = glReadPixels@28 +- glRectd = glRectd@32 +- glRectdv = glRectdv@8 +- glRectf = glRectf@16 +- glRectfv = glRectfv@8 +- glRecti = glRecti@16 +- glRectiv = glRectiv@8 +- glRects = glRects@16 +- glRectsv = glRectsv@8 +- glRenderMode = glRenderMode@4 +- glRotated = glRotated@32 +- glRotatef = glRotatef@16 +- glScaled = glScaled@24 +- glScalef = glScalef@12 +- glScissor = glScissor@16 +- glSelectBuffer = glSelectBuffer@8 +- glShadeModel = glShadeModel@4 +- glStencilFunc = glStencilFunc@12 +- glStencilMask = glStencilMask@4 +- glStencilOp = glStencilOp@12 +- glTexCoord1d = glTexCoord1d@8 +- glTexCoord1dv = glTexCoord1dv@4 +- glTexCoord1f = glTexCoord1f@4 +- glTexCoord1fv = glTexCoord1fv@4 +- glTexCoord1i = glTexCoord1i@4 +- glTexCoord1iv = glTexCoord1iv@4 +- glTexCoord1s = glTexCoord1s@4 +- glTexCoord1sv = glTexCoord1sv@4 +- glTexCoord2d = glTexCoord2d@16 +- glTexCoord2dv = glTexCoord2dv@4 +- glTexCoord2f = glTexCoord2f@8 +- glTexCoord2fv = glTexCoord2fv@4 +- glTexCoord2i = glTexCoord2i@8 +- glTexCoord2iv = glTexCoord2iv@4 +- glTexCoord2s = glTexCoord2s@8 +- glTexCoord2sv = glTexCoord2sv@4 +- glTexCoord3d = glTexCoord3d@24 +- glTexCoord3dv = glTexCoord3dv@4 +- glTexCoord3f = glTexCoord3f@12 +- glTexCoord3fv = glTexCoord3fv@4 +- glTexCoord3i = glTexCoord3i@12 +- glTexCoord3iv = glTexCoord3iv@4 +- glTexCoord3s = glTexCoord3s@12 +- glTexCoord3sv = glTexCoord3sv@4 +- glTexCoord4d = glTexCoord4d@32 +- glTexCoord4dv = glTexCoord4dv@4 +- glTexCoord4f = glTexCoord4f@16 +- glTexCoord4fv = glTexCoord4fv@4 +- glTexCoord4i = glTexCoord4i@16 +- glTexCoord4iv = glTexCoord4iv@4 +- glTexCoord4s = glTexCoord4s@16 +- glTexCoord4sv = glTexCoord4sv@4 +- glTexCoordPointer = glTexCoordPointer@16 +- glTexEnvf = glTexEnvf@12 +- glTexEnvfv = glTexEnvfv@12 +- glTexEnvi = glTexEnvi@12 +- glTexEnviv = glTexEnviv@12 +- glTexGend = glTexGend@16 +- glTexGendv = glTexGendv@12 +- glTexGenf = glTexGenf@12 +- glTexGenfv = glTexGenfv@12 +- glTexGeni = glTexGeni@12 +- glTexGeniv = glTexGeniv@12 +- glTexImage1D = glTexImage1D@32 +- glTexImage2D = glTexImage2D@36 +- glTexParameterf = glTexParameterf@12 +- glTexParameterfv = glTexParameterfv@12 +- glTexParameteri = glTexParameteri@12 +- glTexParameteriv = glTexParameteriv@12 +- glTexSubImage1D = glTexSubImage1D@28 +- glTexSubImage2D = glTexSubImage2D@36 +- glTranslated = glTranslated@24 +- glTranslatef = glTranslatef@12 +- glVertex2d = glVertex2d@16 +- glVertex2dv = glVertex2dv@4 +- glVertex2f = glVertex2f@8 +- glVertex2fv = glVertex2fv@4 +- glVertex2i = glVertex2i@8 +- glVertex2iv = glVertex2iv@4 +- glVertex2s = glVertex2s@8 +- glVertex2sv = glVertex2sv@4 +- glVertex3d = glVertex3d@24 +- glVertex3dv = glVertex3dv@4 +- glVertex3f = glVertex3f@12 +- glVertex3fv = glVertex3fv@4 +- glVertex3i = glVertex3i@12 +- glVertex3iv = glVertex3iv@4 +- glVertex3s = glVertex3s@12 +- glVertex3sv = glVertex3sv@4 +- glVertex4d = glVertex4d@32 +- glVertex4dv = glVertex4dv@4 +- glVertex4f = glVertex4f@16 +- glVertex4fv = glVertex4fv@4 +- glVertex4i = glVertex4i@16 +- glVertex4iv = glVertex4iv@4 +- glVertex4s = glVertex4s@16 +- glVertex4sv = glVertex4sv@4 +- glVertexPointer = glVertexPointer@16 +- glViewport = glViewport@16 +diff --git a/src/gallium/targets/wgl/gallium_wgl.def b/src/gallium/targets/wgl/gallium_wgl.def +deleted file mode 100644 +index 6d39d2eadc9bb2e941f3399efcc54f4b1c2c79da..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/wgl/gallium_wgl.def ++++ /dev/null +@@ -1,38 +0,0 @@ +-EXPORTS +- DrvCopyContext +- DrvCreateContext +- DrvCreateLayerContext +- DrvDeleteContext +- DrvDescribeLayerPlane +- DrvDescribePixelFormat +- DrvGetLayerPaletteEntries +- DrvGetProcAddress +- DrvPresentBuffers +- DrvRealizeLayerPalette +- DrvReleaseContext +- DrvSetCallbackProcs +- DrvSetContext +- DrvSetLayerPaletteEntries +- DrvSetPixelFormat +- DrvShareLists +- DrvSwapBuffers +- DrvSwapLayerBuffers +- DrvValidateVersion +- +- stw_get_device +- stw_init_screen +- stw_get_current_context +- stw_get_current_dc +- stw_pixelformat_choose +- stw_pixelformat_get +- stw_pixelformat_get_info +- stw_override_opengl32_entry_points +- stw_create_context_attribs +- stw_destroy_context +- stw_unbind_context +- stw_current_context +- stw_make_current +- stw_framebuffer_create +- stw_framebuffer_release_locked +- stw_framebuffer_unlock +- stw_framebuffer_swap_locked +diff --git a/src/gallium/targets/wgl/gallium_wgl.def.in b/src/gallium/targets/wgl/gallium_wgl.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..860389d48cc44bd61c4a3df6d1405c2ccf06f099 +--- /dev/null ++++ b/src/gallium/targets/wgl/gallium_wgl.def.in +@@ -0,0 +1,39 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++DrvCopyContext@12 ++DrvCreateContext@4 ++DrvCreateLayerContext@8 ++DrvDeleteContext@4 ++DrvDescribeLayerPlane@20 ++DrvDescribePixelFormat@16 ++DrvGetLayerPaletteEntries@20 ++DrvGetProcAddress@4 ++DrvPresentBuffers@8 ++DrvRealizeLayerPalette@12 ++DrvReleaseContext@4 ++DrvSetCallbackProcs@8 ++DrvSetContext@12 ++DrvSetLayerPaletteEntries@20 ++DrvSetPixelFormat@8 ++DrvShareLists@8 ++DrvSwapBuffers@4 ++DrvSwapLayerBuffers@8 ++DrvValidateVersion@4 ++ ++; __cdecl calling convention have no @number suffix ++stw_get_device ++stw_init_screen ++stw_get_current_context ++stw_get_current_dc ++stw_pixelformat_choose ++stw_pixelformat_get ++stw_pixelformat_get_info ++stw_override_opengl32_entry_points ++stw_create_context_attribs ++stw_destroy_context ++stw_unbind_context ++stw_current_context ++stw_make_current ++stw_framebuffer_create ++stw_framebuffer_release_locked ++stw_framebuffer_unlock ++stw_framebuffer_swap_locked +diff --git a/src/gallium/targets/wgl/gallium_wgl.mingw.def b/src/gallium/targets/wgl/gallium_wgl.mingw.def +deleted file mode 100644 +index ee23392d95ec26ca1d774f57b5979a153eab76a0..0000000000000000000000000000000000000000 +--- a/src/gallium/targets/wgl/gallium_wgl.mingw.def ++++ /dev/null +@@ -1,26 +0,0 @@ +-EXPORTS +- DrvCopyContext = DrvCopyContext@12 +- DrvCreateContext = DrvCreateContext@4 +- DrvCreateLayerContext = DrvCreateLayerContext@8 +- DrvDeleteContext = DrvDeleteContext@4 +- DrvDescribeLayerPlane = DrvDescribeLayerPlane@20 +- DrvDescribePixelFormat = DrvDescribePixelFormat@16 +- DrvGetLayerPaletteEntries = DrvGetLayerPaletteEntries@20 +- DrvGetProcAddress = DrvGetProcAddress@4 +- DrvPresentBuffers = DrvPresentBuffers@8 +- DrvRealizeLayerPalette = DrvRealizeLayerPalette@12 +- DrvReleaseContext = DrvReleaseContext@4 +- DrvSetCallbackProcs = DrvSetCallbackProcs@8 +- DrvSetContext = DrvSetContext@12 +- DrvSetLayerPaletteEntries = DrvSetLayerPaletteEntries@20 +- DrvSetPixelFormat = DrvSetPixelFormat@8 +- DrvShareLists = DrvShareLists@8 +- DrvSwapBuffers = DrvSwapBuffers@4 +- DrvSwapLayerBuffers = DrvSwapLayerBuffers@8 +- DrvValidateVersion = DrvValidateVersion@4 +- +- stw_get_current_context = stw_get_current_context@0 +- stw_get_current_dc = stw_get_current_dc@0 +- stw_pixelformat_choose = stw_pixelformat_choose@8 +- stw_pixelformat_get = stw_pixelformat_get@4 +- stw_override_opengl32_entry_points = stw_override_opengl32_entry_points@8 +diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build +index 92571a7c8f7bcf6847360bcd725732bd144f35c9..ace7c33eb9499a8058598570890d3e408918e7ff 100644 +--- a/src/gallium/targets/wgl/meson.build ++++ b/src/gallium/targets/wgl/meson.build +@@ -20,15 +20,15 @@ + + + gallium_wgl_link_args = [] +-if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64' +- gallium_wgl_link_args += ['-Wl,--enable-stdcall-fixup'] +-endif + +-if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64' +- wgl_def = 'gallium_wgl.mingw.def' +-else +- wgl_def = 'gallium_wgl.def' +-endif ++wgl_def = custom_target( ++ 'gallium_wgl.def', ++ input: 'gallium_wgl.def.in', ++ output : 'gallium_wgl.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) + + libgallium_wgl = shared_library( + 'gallium_wgl', +diff --git a/src/mapi/es1api/gles1.def.in b/src/mapi/es1api/gles1.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..35954aed7ad7ffc6709c5287a3f55c7e6cb0246e +--- /dev/null ++++ b/src/mapi/es1api/gles1.def.in +@@ -0,0 +1,146 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++glActiveTexture ++glAlphaFunc ++glAlphaFuncx ++glBindBuffer ++glBindTexture ++glBlendFunc ++glBufferData ++glBufferSubData ++glClear ++glClearColor ++glClearColorx ++glClearDepthf ++glClearDepthx ++glClearStencil ++glClientActiveTexture ++glClipPlanef ++glClipPlanex ++glColor4f ++glColor4ub ++glColor4x ++glColorMask ++glColorPointer ++glCompressedTexImage2D ++glCompressedTexSubImage2D ++glCopyTexImage2D ++glCopyTexSubImage2D ++glCullFace ++glDeleteBuffers ++glDeleteTextures ++glDepthFunc ++glDepthMask ++glDepthRangef ++glDepthRangex ++glDisable ++glDisableClientState ++glDrawArrays ++glDrawElements ++glEnable ++glEnableClientState ++glFinish ++glFlush ++glFogf ++glFogfv ++glFogx ++glFogxv ++glFrontFace ++glFrustumf ++glFrustumx ++glGenBuffers ++glGenTextures ++glGetBooleanv ++glGetBufferParameteriv ++glGetClipPlanef ++glGetClipPlanex ++glGetError ++glGetFixedv ++glGetFloatv ++glGetIntegerv ++glGetLightfv ++glGetLightxv ++glGetMaterialfv ++glGetMaterialxv ++glGetPointerv ++glGetString ++glGetTexEnvfv ++glGetTexEnviv ++glGetTexEnvxv ++glGetTexParameterfv ++glGetTexParameteriv ++glGetTexParameterxv ++glHint ++glIsBuffer ++glIsEnabled ++glIsTexture ++glLightf ++glLightfv ++glLightModelf ++glLightModelfv ++glLightModelx ++glLightModelxv ++glLightx ++glLightxv ++glLineWidth ++glLineWidthx ++glLoadIdentity ++glLoadMatrixf ++glLoadMatrixx ++glLogicOp ++glMaterialf ++glMaterialfv ++glMaterialx ++glMaterialxv ++glMatrixMode ++glMultiTexCoord4f ++glMultiTexCoord4x ++glMultMatrixf ++glMultMatrixx ++glNormal3f ++glNormal3x ++glNormalPointer ++glOrthof ++glOrthox ++glPixelStorei ++glPointParameterf ++glPointParameterfv ++glPointParameterx ++glPointParameterxv ++glPointSize ++glPointSizePointerOES ++glPointSizex ++glPolygonOffset ++glPolygonOffsetx ++glPopMatrix ++glPushMatrix ++glReadPixels ++glRotatef ++glRotatex ++glSampleCoverage ++glSampleCoveragex ++glScalef ++glScalex ++glScissor ++glShadeModel ++glStencilFunc ++glStencilMask ++glStencilOp ++glTexCoordPointer ++glTexEnvf ++glTexEnvfv ++glTexEnvi ++glTexEnviv ++glTexEnvx ++glTexEnvxv ++glTexImage2D ++glTexParameterf ++glTexParameterfv ++glTexParameteri ++glTexParameteriv ++glTexParameterx ++glTexParameterxv ++glTexSubImage2D ++glTranslatef ++glTranslatex ++glVertexPointer ++glViewport +diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build +index 8b749b1a3324be96f0d69816e638f1131ec8c307..4bca37b5e32f77d55655c49ca0580b75707edc6b 100644 +--- a/src/mapi/es1api/meson.build ++++ b/src/mapi/es1api/meson.build +@@ -29,12 +29,22 @@ es1_glapi_mapi_tmp_h = custom_target( + + _es1_c_args = [] + if with_platform_windows +- _es1_c_args += ['-D_GDI32_', '-DBUILD_GL32'] ++ _es1_c_args += ['-D_GDI32_'] + endif + ++gles1_def = custom_target( ++ 'gles1.def', ++ input: 'gles1.def.in', ++ output : 'gles1.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) ++ + libglesv1_cm = shared_library( + 'GLESv1_CM' + get_option('gles-lib-suffix'), + ['../entry.c', es1_glapi_mapi_tmp_h], ++ vs_module_defs : gles1_def, + c_args : [ + c_msvc_compat_args, + _es1_c_args, +diff --git a/src/mapi/es2api/gles2.def.in b/src/mapi/es2api/gles2.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..a6b2abc06350550397e66a6ce032b546f6b39569 +--- /dev/null ++++ b/src/mapi/es2api/gles2.def.in +@@ -0,0 +1,359 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++glActiveShaderProgram ++glActiveTexture ++glAttachShader ++glBeginQuery ++glBeginTransformFeedback ++glBindAttribLocation ++glBindBuffer ++glBindBufferBase ++glBindBufferRange ++glBindFramebuffer ++glBindImageTexture ++glBindProgramPipeline ++glBindRenderbuffer ++glBindSampler ++glBindTexture ++glBindTransformFeedback ++glBindVertexArray ++glBindVertexBuffer ++glBlendBarrier ++glBlendColor ++glBlendEquation ++glBlendEquationSeparate ++glBlendEquationSeparatei ++glBlendEquationi ++glBlendFunc ++glBlendFuncSeparate ++glBlendFuncSeparatei ++glBlendFunci ++glBlitFramebuffer ++glBufferData ++glBufferSubData ++glCheckFramebufferStatus ++glClear ++glClearBufferfi ++glClearBufferfv ++glClearBufferiv ++glClearBufferuiv ++glClearColor ++glClearDepthf ++glClearStencil ++glClientWaitSync ++glColorMask ++glColorMaski ++glCompileShader ++glCompressedTexImage2D ++glCompressedTexImage3D ++glCompressedTexSubImage2D ++glCompressedTexSubImage3D ++glCopyBufferSubData ++glCopyImageSubData ++glCopyTexImage2D ++glCopyTexSubImage2D ++glCopyTexSubImage3D ++glCreateProgram ++glCreateShader ++glCreateShaderProgramv ++glCullFace ++glDebugMessageCallback ++glDebugMessageControl ++glDebugMessageInsert ++glDeleteBuffers ++glDeleteFramebuffers ++glDeleteProgram ++glDeleteProgramPipelines ++glDeleteQueries ++glDeleteRenderbuffers ++glDeleteSamplers ++glDeleteShader ++glDeleteSync ++glDeleteTextures ++glDeleteTransformFeedbacks ++glDeleteVertexArrays ++glDepthFunc ++glDepthMask ++glDepthRangef ++glDetachShader ++glDisable ++glDisableVertexAttribArray ++glDisablei ++glDispatchCompute ++glDispatchComputeIndirect ++glDrawArrays ++glDrawArraysIndirect ++glDrawArraysInstanced ++glDrawBuffers ++glDrawElements ++glDrawElementsBaseVertex ++glDrawElementsIndirect ++glDrawElementsInstanced ++glDrawElementsInstancedBaseVertex ++glDrawRangeElements ++glDrawRangeElementsBaseVertex ++glEnable ++glEnableVertexAttribArray ++glEnablei ++glEndQuery ++glEndTransformFeedback ++glFenceSync ++glFinish ++glFlush ++glFlushMappedBufferRange ++glFramebufferParameteri ++glFramebufferRenderbuffer ++glFramebufferTexture ++glFramebufferTexture2D ++glFramebufferTextureLayer ++glFrontFace ++glGenBuffers ++glGenFramebuffers ++glGenProgramPipelines ++glGenQueries ++glGenRenderbuffers ++glGenSamplers ++glGenTextures ++glGenTransformFeedbacks ++glGenVertexArrays ++glGenerateMipmap ++glGetActiveAttrib ++glGetActiveUniform ++glGetActiveUniformBlockName ++glGetActiveUniformBlockiv ++glGetActiveUniformsiv ++glGetAttachedShaders ++glGetAttribLocation ++glGetBooleani_v ++glGetBooleanv ++glGetBufferParameteri64v ++glGetBufferParameteriv ++glGetBufferPointerv ++glGetDebugMessageLog ++glGetError ++glGetFloatv ++glGetFragDataLocation ++glGetFramebufferAttachmentParameteriv ++glGetFramebufferParameteriv ++glGetGraphicsResetStatus ++glGetInteger64i_v ++glGetInteger64v ++glGetIntegeri_v ++glGetIntegerv ++glGetInternalformativ ++glGetMultisamplefv ++glGetObjectLabel ++glGetObjectPtrLabel ++glGetPointerv ++glGetProgramBinary ++glGetProgramInfoLog ++glGetProgramInterfaceiv ++glGetProgramPipelineInfoLog ++glGetProgramPipelineiv ++glGetProgramResourceIndex ++glGetProgramResourceLocation ++glGetProgramResourceName ++glGetProgramResourceiv ++glGetProgramiv ++glGetQueryObjectuiv ++glGetQueryiv ++glGetRenderbufferParameteriv ++glGetSamplerParameterIiv ++glGetSamplerParameterIuiv ++glGetSamplerParameterfv ++glGetSamplerParameteriv ++glGetShaderInfoLog ++glGetShaderPrecisionFormat ++glGetShaderSource ++glGetShaderiv ++glGetString ++glGetStringi ++glGetSynciv ++glGetTexLevelParameterfv ++glGetTexLevelParameteriv ++glGetTexParameterIiv ++glGetTexParameterIuiv ++glGetTexParameterfv ++glGetTexParameteriv ++glGetTransformFeedbackVarying ++glGetUniformBlockIndex ++glGetUniformIndices ++glGetUniformLocation ++glGetUniformfv ++glGetUniformiv ++glGetUniformuiv ++glGetVertexAttribIiv ++glGetVertexAttribIuiv ++glGetVertexAttribPointerv ++glGetVertexAttribfv ++glGetVertexAttribiv ++glGetnUniformfv ++glGetnUniformiv ++glGetnUniformuiv ++glHint ++glInvalidateFramebuffer ++glInvalidateSubFramebuffer ++glIsBuffer ++glIsEnabled ++glIsEnabledi ++glIsFramebuffer ++glIsProgram ++glIsProgramPipeline ++glIsQuery ++glIsRenderbuffer ++glIsSampler ++glIsShader ++glIsSync ++glIsTexture ++glIsTransformFeedback ++glIsVertexArray ++glLineWidth ++glLinkProgram ++glMapBufferRange ++glMemoryBarrier ++glMemoryBarrierByRegion ++glMinSampleShading ++glObjectLabel ++glObjectPtrLabel ++glPatchParameteri ++glPauseTransformFeedback ++glPixelStorei ++glPolygonOffset ++glPopDebugGroup ++glPrimitiveBoundingBox ++glProgramBinary ++glProgramParameteri ++glProgramUniform1f ++glProgramUniform1fv ++glProgramUniform1i ++glProgramUniform1iv ++glProgramUniform1ui ++glProgramUniform1uiv ++glProgramUniform2f ++glProgramUniform2fv ++glProgramUniform2i ++glProgramUniform2iv ++glProgramUniform2ui ++glProgramUniform2uiv ++glProgramUniform3f ++glProgramUniform3fv ++glProgramUniform3i ++glProgramUniform3iv ++glProgramUniform3ui ++glProgramUniform3uiv ++glProgramUniform4f ++glProgramUniform4fv ++glProgramUniform4i ++glProgramUniform4iv ++glProgramUniform4ui ++glProgramUniform4uiv ++glProgramUniformMatrix2fv ++glProgramUniformMatrix2x3fv ++glProgramUniformMatrix2x4fv ++glProgramUniformMatrix3fv ++glProgramUniformMatrix3x2fv ++glProgramUniformMatrix3x4fv ++glProgramUniformMatrix4fv ++glProgramUniformMatrix4x2fv ++glProgramUniformMatrix4x3fv ++glPushDebugGroup ++glReadBuffer ++glReadPixels ++glReadnPixels ++glReleaseShaderCompiler ++glRenderbufferStorage ++glRenderbufferStorageMultisample ++glResumeTransformFeedback ++glSampleCoverage ++glSampleMaski ++glSamplerParameterIiv ++glSamplerParameterIuiv ++glSamplerParameterf ++glSamplerParameterfv ++glSamplerParameteri ++glSamplerParameteriv ++glScissor ++glShaderBinary ++glShaderSource ++glStencilFunc ++glStencilFuncSeparate ++glStencilMask ++glStencilMaskSeparate ++glStencilOp ++glStencilOpSeparate ++glTexBuffer ++glTexBufferRange ++glTexImage2D ++glTexImage3D ++glTexParameterIiv ++glTexParameterIuiv ++glTexParameterf ++glTexParameterfv ++glTexParameteri ++glTexParameteriv ++glTexStorage2D ++glTexStorage2DMultisample ++glTexStorage3D ++glTexStorage3DMultisample ++glTexSubImage2D ++glTexSubImage3D ++glTransformFeedbackVaryings ++glUniform1f ++glUniform1fv ++glUniform1i ++glUniform1iv ++glUniform1ui ++glUniform1uiv ++glUniform2f ++glUniform2fv ++glUniform2i ++glUniform2iv ++glUniform2ui ++glUniform2uiv ++glUniform3f ++glUniform3fv ++glUniform3i ++glUniform3iv ++glUniform3ui ++glUniform3uiv ++glUniform4f ++glUniform4fv ++glUniform4i ++glUniform4iv ++glUniform4ui ++glUniform4uiv ++glUniformBlockBinding ++glUniformMatrix2fv ++glUniformMatrix2x3fv ++glUniformMatrix2x4fv ++glUniformMatrix3fv ++glUniformMatrix3x2fv ++glUniformMatrix3x4fv ++glUniformMatrix4fv ++glUniformMatrix4x2fv ++glUniformMatrix4x3fv ++glUnmapBuffer ++glUseProgram ++glUseProgramStages ++glValidateProgram ++glValidateProgramPipeline ++glVertexAttrib1f ++glVertexAttrib1fv ++glVertexAttrib2f ++glVertexAttrib2fv ++glVertexAttrib3f ++glVertexAttrib3fv ++glVertexAttrib4f ++glVertexAttrib4fv ++glVertexAttribBinding ++glVertexAttribDivisor ++glVertexAttribFormat ++glVertexAttribI4i ++glVertexAttribI4iv ++glVertexAttribI4ui ++glVertexAttribI4uiv ++glVertexAttribIFormat ++glVertexAttribIPointer ++glVertexAttribPointer ++glVertexBindingDivisor ++glViewport ++glWaitSync +diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build +index 356c5760c495e5b8a52abc2c841741f9b2b47222..8b133daa131276025072b4a85318e423206981cc 100644 +--- a/src/mapi/es2api/meson.build ++++ b/src/mapi/es2api/meson.build +@@ -29,12 +29,22 @@ es2_glapi_mapi_tmp_h = custom_target( + + _es2_c_args = [] + if with_platform_windows +- _es2_c_args += ['-D_GDI32_', '-DBUILD_GL32'] ++ _es2_c_args += ['-D_GDI32_'] + endif + ++gles2_def = custom_target( ++ 'gles2.def', ++ input: 'gles2.def.in', ++ output : 'gles2.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) ++ + libgles2 = shared_library( + 'GLESv2' + get_option('gles-lib-suffix'), + ['../entry.c', es2_glapi_mapi_tmp_h], ++ vs_module_defs : gles2_def, + c_args : [ + c_msvc_compat_args, + _es2_c_args, +diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build +index 270b9870b400803d5cc8c484242c65b96ba99b9d..9f06207fe0a24e123b542ddf886ce2b325b0e105 100644 +--- a/src/mapi/glapi/meson.build ++++ b/src/mapi/glapi/meson.build +@@ -52,7 +52,7 @@ if with_shared_glapi + else + static_glapi_args += '-DMAPI_MODE_UTIL' + if with_platform_windows +- static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32', '-DKHRONOS_DLL_EXPORTS', '-D_GLAPI_NO_EXPORTS'] ++ static_glapi_args += ['-D_GDI32_', '-DKHRONOS_DLL_EXPORTS', '-D_GLAPI_NO_EXPORTS'] + endif + static_glapi_files += files( + 'glapi_dispatch.c', +diff --git a/src/mesa/meson.build b/src/mesa/meson.build +index bc7963413ff46781ae4a58a7762a58a73e67a23a..08b0cac497490fa40230861bd24bdba6e83016ad 100644 +--- a/src/mesa/meson.build ++++ b/src/mesa/meson.build +@@ -489,7 +489,6 @@ _mesa_windows_args = [] + if with_platform_windows + _mesa_windows_args += [ + '-D_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers +- '-DBUILD_GL32' # declare gl* as __declspec(dllexport) in Mesa headers + ] + if not with_shared_glapi + # prevent _glapi_* from being declared __declspec(dllimport) +diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build +index 6384af782976e3f8300cf5e69d11e98fa6ac5e83..8c2f0dd08632116eebbd982516e1004e9db01e09 100644 +--- a/src/vulkan/meson.build ++++ b/src/vulkan/meson.build +@@ -27,6 +27,15 @@ vulkan_wsi_args = [] + vulkan_wsi_deps = [] + vulkan_wsi_list = [] + ++vulkan_api_def = custom_target( ++ 'vulkan_api.def', ++ input: 'vulkan_api.def.in', ++ output : 'vulkan_api.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) ++ + if with_platform_x11 + vulkan_wsi_deps += [ + dep_xcb, +diff --git a/src/vulkan/vulkan_api.def.in b/src/vulkan/vulkan_api.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..678e4d99278b96d0ef1ee15c51e5febf8fcea58e +--- /dev/null ++++ b/src/vulkan/vulkan_api.def.in +@@ -0,0 +1,4 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++vk_icdNegotiateLoaderICDInterfaceVersion@4 ++vk_icdGetInstanceProcAddr@8 ++vk_icdGetPhysicalDeviceProcAddr@8 diff --git a/ports/mesa/portfile.cmake b/ports/mesa/portfile.cmake index 5fa919888dacef..6ab0cb7fa4da44 100644 --- a/ports/mesa/portfile.cmake +++ b/ports/mesa/portfile.cmake @@ -3,16 +3,12 @@ # Patches are from https://github.com/pal1000/mesa-dist-win/tree/master/patches set(PATCHES - # Fix swrAVX512 build - swravx512-post-static-link.patch - # Fix swr build with MSVC - swr-msvc-2.patch - # Fix swr build with LLVM 13 - swr-llvm13.patch - # Fix radv MSVC build with LLVM 13 - radv-msvc-llvm13-2.patch - # Fix d3d10sw MSVC build - d3d10sw.patch + # Fix symbols exporting for MinGW GCC x86 + def-fixes.patch + # Fix MinGW clang build + clang.patch + # Clover build on Windows + clover.patch ) vcpkg_check_linkage(ONLY_DYNAMIC_CRT) @@ -24,8 +20,8 @@ vcpkg_from_gitlab( GITLAB_URL https://gitlab.freedesktop.org OUT_SOURCE_PATH SOURCE_PATH REPO mesa/mesa - REF mesa-21.2.5 - SHA512 a9ead27f08e862738938cf728928b7937ff37e4c26967f2e46e40a3c8419159397f75b2f4ce43f9b453b35bb3716df581087fb7ba8434fafdfab9488c3db6f92 + REF mesa-22.0.1 + SHA512 afa72ccba680ed94438f51c6ba564c8461983f5b78065b4a1cc0d1ed90fe67eea8c56ba4066ed61a181fd8a5e49536b4f22b2be9c924976726aad04dd03b0dca FILE_DISAMBIGUATOR 1 HEAD_REF master PATCHES ${PATCHES} @@ -63,7 +59,6 @@ if(WIN32) # WIN32 HOST probably has win_flex and win_bison! endif() # For features https://github.com/pal1000/mesa-dist-win should be probably studied a bit more. -#string(APPEND GALLIUM_DRIVERS 'auto') list(APPEND MESA_OPTIONS -Dzstd=enabled) list(APPEND MESA_OPTIONS -Dshared-llvm=auto) list(APPEND MESA_OPTIONS -Dlibunwind=disabled) @@ -74,24 +69,12 @@ list(APPEND MESA_OPTIONS -Dglx=disabled) list(APPEND MESA_OPTIONS -Dgbm=disabled) list(APPEND MESA_OPTIONS -Dosmesa=true) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND MESA_OPTIONS -Dshared-swr=false) - list(APPEND MESA_OPTIONS "-Dswr-arches=['avx']") -else() - list(APPEND MESA_OPTIONS -Dshared-swr=true) - list(APPEND MESA_OPTIONS "-Dswr-arches=['avx','avx2','knl','skx']") -endif() - -string(APPEND GALLIUM_DRIVERS 'swrast') if("llvm" IN_LIST FEATURES) list(APPEND MESA_OPTIONS -Dllvm=enabled) - string(APPEND GALLIUM_DRIVERS ",'swr'") # SWR always requires llvm else() list(APPEND MESA_OPTIONS -Dllvm=disabled) endif() -list(APPEND MESA_OPTIONS -Dgallium-drivers=[${GALLIUM_DRIVERS}]) - if("gles1" IN_LIST FEATURES) list(APPEND MESA_OPTIONS -Dgles1=enabled) else() @@ -118,12 +101,12 @@ list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) #shared GLAPI required when bu if(VCPKG_TARGET_IS_WINDOWS) list(APPEND MESA_OPTIONS -Dplatforms=['windows']) list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled) - if(NOT VCPKG_TARGET_IS_MINGW) - set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}") - set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}") - endif() + if(NOT VCPKG_TARGET_IS_MINGW) + set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}") + set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}") + endif() endif() - + vcpkg_configure_meson( SOURCE_PATH "${SOURCE_PATH}" OPTIONS diff --git a/ports/mesa/radv-msvc-llvm13-2.patch b/ports/mesa/radv-msvc-llvm13-2.patch deleted file mode 100644 index 039ef66d93fe0f..00000000000000 --- a/ports/mesa/radv-msvc-llvm13-2.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/amd/compiler/aco_print_asm.cpp b/src/amd/compiler/aco_print_asm.cpp -index dcc7c4bc747..413e6464c79 100644 ---- a/src/amd/compiler/aco_print_asm.cpp -+++ b/src/amd/compiler/aco_print_asm.cpp -@@ -24,6 +24,9 @@ - - #include "aco_ir.h" - -+#if defined(_MSC_VER) && defined(restrict) -+#undef restrict -+#endif - #include "llvm/ac_llvm_util.h" - - #include "llvm-c/Disassembler.h" diff --git a/ports/mesa/swr-llvm13.patch b/ports/mesa/swr-llvm13.patch deleted file mode 100644 index e0da05bf5b53c8..00000000000000 --- a/ports/mesa/swr-llvm13.patch +++ /dev/null @@ -1,334 +0,0 @@ -diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp -index 44482939c7649a2bcc39f3b2eb75720de90bcef0..1124e3773b99430c8da5ccb061d92b1b3a1bf1a6 100644 ---- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp -+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp -@@ -56,6 +56,14 @@ - using namespace llvm; - using namespace SwrJit; - -+#if LLVM_VERSION_MAJOR >= 7 -+static constexpr llvm::sys::fs::OpenFlags OF_NONE = llvm::sys::fs::OF_None; -+static constexpr llvm::sys::fs::OpenFlags OF_TEXT = llvm::sys::fs::OF_Text; -+#else -+static constexpr llvm::sys::fs::OpenFlags OF_NONE = llvm::sys::fs::F_None; -+static constexpr llvm::sys::fs::OpenFlags OF_TEXT = llvm::sys::fs::F_Text; -+#endif -+ - ////////////////////////////////////////////////////////////////////////// - /// @brief Contructor for JitManager. - /// @param simdWidth - SIMD width to be used in generated program. -@@ -437,7 +445,7 @@ void JitManager::DumpAsm(Function* pFunction, const char* fileName) - sprintf(fName, "%s.%s.asm", funcName, fileName); - #endif - -- raw_fd_ostream filestream(fName, EC, llvm::sys::fs::F_None); -+ raw_fd_ostream filestream(fName, EC, OF_NONE); - - legacy::PassManager* pMPasses = new legacy::PassManager(); - auto* pTarget = mpExec->getTargetMachine(); -@@ -490,7 +498,7 @@ void JitManager::DumpToFile(Module* M, - #else - sprintf(fName, "%s.%s.ll", funcName, fileName); - #endif -- raw_fd_ostream fd(fName, EC, llvm::sys::fs::F_None); -+ raw_fd_ostream fd(fName, EC, OF_NONE); - M->print(fd, annotater); - fd.flush(); - } -@@ -512,7 +520,7 @@ void JitManager::DumpToFile(Function* f, const char* fileName) - #else - sprintf(fName, "%s.%s.ll", funcName, fileName); - #endif -- raw_fd_ostream fd(fName, EC, llvm::sys::fs::F_None); -+ raw_fd_ostream fd(fName, EC, OF_NONE); - f->print(fd, nullptr); - - #if defined(_WIN32) -@@ -522,7 +530,7 @@ void JitManager::DumpToFile(Function* f, const char* fileName) - #endif - fd.flush(); - -- raw_fd_ostream fd_cfg(fName, EC, llvm::sys::fs::F_Text); -+ raw_fd_ostream fd_cfg(fName, EC, OF_TEXT); - WriteGraph(fd_cfg, (const Function*)f); - - fd_cfg.flush(); -@@ -726,7 +734,7 @@ void JitCache::notifyObjectCompiled(const llvm::Module* M, llvm::MemoryBufferRef - - { - std::error_code err; -- llvm::raw_fd_ostream fileObj(objPath.c_str(), err, llvm::sys::fs::F_None); -+ llvm::raw_fd_ostream fileObj(objPath.c_str(), err, OF_NONE); - fileObj << Obj.getBuffer(); - fileObj.flush(); - } -@@ -734,7 +742,7 @@ void JitCache::notifyObjectCompiled(const llvm::Module* M, llvm::MemoryBufferRef - - { - std::error_code err; -- llvm::raw_fd_ostream fileObj(filePath.c_str(), err, llvm::sys::fs::F_None); -+ llvm::raw_fd_ostream fileObj(filePath.c_str(), err, OF_NONE); - - uint32_t objcrc = ComputeCRC(0, Obj.getBufferStart(), Obj.getBufferSize()); - -diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h -index c361959b76ff0799f5102ad4b8ddf23d345105d9..64a690b47fac9ee99eba8f1259ffccf20f0e5fa0 100644 ---- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h -+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h -@@ -41,31 +41,29 @@ namespace SwrJit - BuilderGfxMem(JitManager* pJitMgr); - virtual ~BuilderGfxMem() {} - -- virtual Value* GEP(Value* Ptr, Value* Idx, Type* Ty = nullptr, bool isReadOnly = true, const Twine& Name = ""); -- virtual Value* GEP(Type* Ty, Value* Ptr, Value* Idx, const Twine& Name = ""); -- virtual Value* -- GEP(Value* Ptr, const std::initializer_list& indexList, Type* Ty = nullptr); -- virtual Value* -- GEP(Value* Ptr, const std::initializer_list& indexList, Type* Ty = nullptr); -+ virtual Value* GEP(Value* Ptr, Value* Idx, Type* Ty = nullptr, bool isReadOnly = true, const Twine& Name = "") override; -+ virtual Value* GEP(Type* Ty, Value* Ptr, Value* Idx, const Twine& Name = "") override; -+ virtual Value* GEP(Value* Ptr, const std::initializer_list& indexList, Type* Ty = nullptr) override; -+ virtual Value* GEP(Value* Ptr, const std::initializer_list& indexList, Type* Ty = nullptr) override; - - virtual LoadInst* LOAD(Value* Ptr, - const char* Name, - Type* Ty = nullptr, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - virtual LoadInst* LOAD(Value* Ptr, - const Twine& Name = "", - Type* Ty = nullptr, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - virtual LoadInst* LOAD(Value* Ptr, - bool isVolatile, - const Twine& Name = "", - Type* Ty = nullptr, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - virtual LoadInst* LOAD(Value* BasePtr, - const std::initializer_list& offset, - const llvm::Twine& Name = "", - Type* Ty = nullptr, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - - virtual CallInst* MASKED_LOAD(Value* Ptr, - unsigned Align, -@@ -73,32 +71,32 @@ namespace SwrJit - Value* PassThru = nullptr, - const Twine& Name = "", - Type* Ty = nullptr, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - -- virtual StoreInst* STORE(Value *Val, Value *Ptr, bool isVolatile = false, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -- -- virtual StoreInst* STORE(Value* Val, Value* BasePtr, const std::initializer_list& offset, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ virtual StoreInst* STORE(Value *Val, Value *Ptr, bool isVolatile = false, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - -- virtual CallInst* MASKED_STORE(Value *Val, Value *Ptr, unsigned Align, Value *Mask, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ virtual StoreInst* STORE(Value* Val, Value* BasePtr, const std::initializer_list& offset, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; -+ -+ virtual CallInst* MASKED_STORE(Value *Val, Value *Ptr, unsigned Align, Value *Mask, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - - virtual Value* GATHERPS(Value* src, - Value* pBase, - Value* indices, - Value* mask, - uint8_t scale = 1, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - virtual Value* GATHERDD(Value* src, - Value* pBase, - Value* indices, - Value* mask, - uint8_t scale = 1, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - - virtual void SCATTERPS(Value* pDst, - Value* vSrc, - Value* vOffsets, - Value* vMask, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override; - - Value* TranslateGfxAddressForRead(Value* xpGfxAddress, - Type* PtrTy = nullptr, -@@ -108,13 +106,13 @@ namespace SwrJit - Type* PtrTy = nullptr, - const Twine& Name = "", - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); -- -+ - protected: - void AssertGFXMemoryParams(Value* ptr, MEM_CLIENT usage); - - virtual void NotifyPrivateContextSet(); - -- virtual Value* OFFSET_TO_NEXT_COMPONENT(Value* base, Constant* offset); -+ virtual Value* OFFSET_TO_NEXT_COMPONENT(Value* base, Constant* offset) override; - - Value* TranslationHelper(Value* Ptr, Type* Ty, Value* pfnTranslateGfxAddress); - void TrackerHelper(Value* Ptr, Type* Ty, MEM_CLIENT usage, bool isRead); -diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp -index b5eb0a782b15214bcf954a7893cd628649a990fc..a16b5d11dbb2f2f1a0bcdc07e4d306b14a90dc4c 100644 ---- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp -+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp -@@ -82,7 +82,12 @@ namespace SwrJit - std::vector indices; - for (auto i : indexList) - indices.push_back(i); -+#if LLVM_VERSION_MAJOR >= 13 -+ Type *EltTy = cast(ptr->getType())->getElementType(); -+ return IN_BOUNDS_GEP(EltTy, ptr, indices); -+#else - return IN_BOUNDS_GEP(ptr, indices); -+#endif - } - - Value* Builder::IN_BOUNDS_GEP(Value* ptr, const std::initializer_list& indexList) -@@ -90,7 +95,12 @@ namespace SwrJit - std::vector indices; - for (auto i : indexList) - indices.push_back(C(i)); -+#if LLVM_VERSION_MAJOR >= 13 -+ Type *EltTy = cast(ptr->getType())->getElementType(); -+ return IN_BOUNDS_GEP(EltTy, ptr, indices); -+#else - return IN_BOUNDS_GEP(ptr, indices); -+#endif - } - - LoadInst* Builder::LOAD(Value* Ptr, const char* Name, Type* Ty, MEM_CLIENT usage) -@@ -130,6 +140,22 @@ namespace SwrJit - return Builder::LOAD(GEPA(basePtr, valIndices), name); - } - -+ CallInst* Builder::MASKED_LOAD(Value* Ptr, -+ unsigned Align, -+ Value* Mask, -+ Value* PassThru, -+ const Twine& Name, -+ Type* Ty, -+ MEM_CLIENT usage) -+ { -+#if LLVM_VERSION_MAJOR >= 13 -+ Type *EltTy = cast(Ptr->getType())->getElementType(); -+ return IRB()->CreateMaskedLoad(EltTy, Ptr, AlignType(Align), Mask, PassThru, Name); -+#else -+ return IRB()->CreateMaskedLoad(Ptr, AlignType(Align), Mask, PassThru, Name); -+#endif -+ } -+ - LoadInst* Builder::LOADV(Value* basePtr, - const std::initializer_list& indices, - const llvm::Twine& name) -@@ -234,7 +260,12 @@ namespace SwrJit - /// @param pVecPassthru - SIMD wide vector of values to load when lane is inactive - Value* Builder::GATHER_PTR(Value* pVecSrcPtr, Value* pVecMask, Value* pVecPassthru) - { -+#if LLVM_VERSION_MAJOR >= 13 -+ Type *EltTy = cast(pVecSrcPtr->getType())->getElementType(); -+ return MASKED_GATHER(EltTy, pVecSrcPtr, AlignType(4), pVecMask, pVecPassthru); -+#else - return MASKED_GATHER(pVecSrcPtr, AlignType(4), pVecMask, pVecPassthru); -+#endif - } - - void Builder::SCATTER_PTR(Value* pVecDstPtr, Value* pVecSrc, Value* pVecMask) -diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h -index 429d5779a4db2a6a3b6c7a7d02169773c935bb95..6682ad892b4038d4b3172b932a34e31a89cd7790 100644 ---- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h -+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h -@@ -82,10 +82,7 @@ virtual CallInst* MASKED_LOAD(Value* Ptr, - Value* PassThru = nullptr, - const Twine& Name = "", - Type* Ty = nullptr, -- MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) --{ -- return IRB()->CreateMaskedLoad(Ptr, AlignType(Align), Mask, PassThru, Name); --} -+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL); - - virtual StoreInst* STORE(Value *Val, Value *Ptr, bool isVolatile = false, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) - { -diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp -index bd5f7588c9189275ddaf3075b0a75e2e8fc1ecf5..2a4cf74722bc9ef1831d25fe6c2bb2f510b8fceb 100644 ---- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp -+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp -@@ -276,7 +276,8 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& fetchState) - JitManager::DumpToFile(fetch, "src"); - - #if defined(_DEBUG) -- verifyFunction(*fetch); -+ // Note that false is returned if there are no errors -+ SWR_ASSERT(!verifyFunction(*fetch, &llvm::errs())); - #endif - - ::FunctionPassManager setupPasses(JM()->mpCurrentModule); -diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp -index 315036920fb3ad364d0039349e148c70e5ba1818..a643b46cd081c026b5a3558d22be557338d4f220 100644 ---- a/src/gallium/drivers/swr/swr_shader.cpp -+++ b/src/gallium/drivers/swr/swr_shader.cpp -@@ -1557,8 +1557,10 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key) - AttributeSet attrSet = AttributeSet::get( - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder); - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet); --#else -+#elif LLVM_VERSION_MAJOR < 14 - pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder); -+#else -+ pFunction->addFnAttrs(attrBuilder); - #endif - - BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction); -@@ -1785,8 +1787,10 @@ BuilderSWR::CompileTES(struct swr_context *ctx, swr_jit_tes_key &key) - AttributeSet attrSet = AttributeSet::get( - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder); - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet); --#else -+#elif LLVM_VERSION_MAJOR < 14 - pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder); -+#else -+ pFunction->addFnAttrs(attrBuilder); - #endif - - BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction); -@@ -2086,8 +2090,10 @@ BuilderSWR::CompileTCS(struct swr_context *ctx, swr_jit_tcs_key &key) - AttributeSet attrSet = AttributeSet::get( - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder); - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet); --#else -+#elif LLVM_VERSION_MAJOR < 14 - pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder); -+#else -+ pFunction->addFnAttrs(attrBuilder); - #endif - - BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction); -@@ -2341,8 +2347,10 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key) - AttributeSet attrSet = AttributeSet::get( - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder); - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet); --#else -+#elif LLVM_VERSION_MAJOR < 14 - pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder); -+#else -+ pFunction->addFnAttrs(attrBuilder); - #endif - - BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction); -@@ -2646,8 +2654,10 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key) - AttributeSet attrSet = AttributeSet::get( - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder); - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet); --#else -+#elif LLVM_VERSION_MAJOR < 14 - pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder); -+#else -+ pFunction->addFnAttrs(attrBuilder); - #endif - - BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction); diff --git a/ports/mesa/swr-msvc-2.patch b/ports/mesa/swr-msvc-2.patch deleted file mode 100644 index f202fa0e865dc6..00000000000000 --- a/ports/mesa/swr-msvc-2.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 68d1addf6f0cf693fdb42db3555112e257a3d771 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= -Date: Sun, 24 Oct 2021 21:36:09 -0400 -Subject: [PATCH] swr: fix MSVC build - ---- - src/gallium/drivers/swr/swr_draw.cpp | 6 +++--- - src/gallium/drivers/swr/swr_state.cpp | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp -index 4b42a8e0390..5d862adb39d 100644 ---- a/src/gallium/drivers/swr/swr_draw.cpp -+++ b/src/gallium/drivers/swr/swr_draw.cpp -@@ -62,7 +62,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, - - if (!indirect && - !info->primitive_restart && -- !u_trim_pipe_prim(info->mode, (unsigned*)&draws[0].count)) -+ !u_trim_pipe_prim((enum pipe_prim_type)info->mode, (unsigned*)&draws[0].count)) - return; - - if (!swr_check_render_cond(pipe)) -@@ -102,7 +102,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, - STREAMOUT_COMPILE_STATE state = {0}; - struct pipe_stream_output_info *so = &ctx->vs->pipe.stream_output; - -- state.numVertsPerPrim = u_vertices_per_prim(info->mode); -+ state.numVertsPerPrim = u_vertices_per_prim((enum pipe_prim_type)info->mode); - - uint32_t offsets[MAX_SO_STREAMS] = {0}; - uint32_t num = 0; -@@ -221,7 +221,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, - if (ctx->gs) - topology = (pipe_prim_type)ctx->gs->info.base.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM]; - else -- topology = info->mode; -+ topology = (enum pipe_prim_type)info->mode; - - switch (topology) { - case PIPE_PRIM_TRIANGLE_FAN: -diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp -index 5f1464e6d0e..818328750bd 100644 ---- a/src/gallium/drivers/swr/swr_state.cpp -+++ b/src/gallium/drivers/swr/swr_state.cpp -@@ -1731,7 +1731,7 @@ swr_update_derived(struct pipe_context *pipe, - /* Has to be before fragment shader, since it sets SWR_NEW_FS */ - if (p_draw_info) { - bool new_prim_is_poly = -- (u_reduced_prim(p_draw_info->mode) == PIPE_PRIM_TRIANGLES) && -+ (u_reduced_prim((enum pipe_prim_type)p_draw_info->mode) == PIPE_PRIM_TRIANGLES) && - (ctx->derived.rastState.fillMode == SWR_FILLMODE_SOLID); - if (new_prim_is_poly != ctx->poly_stipple.prim_is_poly) { - ctx->dirty |= SWR_NEW_FS; --- -2.25.1 - diff --git a/ports/mesa/swravx512-post-static-link.patch b/ports/mesa/swravx512-post-static-link.patch deleted file mode 100644 index ac88d9bd738c58..00000000000000 --- a/ports/mesa/swravx512-post-static-link.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build -index 11ea7d3f43e..f34e88b1eec 100644 ---- a/src/gallium/drivers/swr/meson.build -+++ b/src/gallium/drivers/swr/meson.build -@@ -213,7 +213,7 @@ endif - - if with_swr_arches.contains('skx') - swr_skx_args = cpp.first_supported_argument( -- '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512', -+ '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512', '/arch:AVX512', - ) - if swr_skx_args == [] - error('Cannot find SKX support for swr.') -@@ -252,7 +252,7 @@ endif - - if with_swr_arches.contains('knl') - swr_knl_args = cpp.first_supported_argument( -- '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', -+ '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', '/arch:AVX512', - ) - if swr_knl_args == [] - error('Cannot find KNL support for swr.') diff --git a/ports/mesa/vcpkg.json b/ports/mesa/vcpkg.json index 8643b1e8823539..12729db18fc417 100644 --- a/ports/mesa/vcpkg.json +++ b/ports/mesa/vcpkg.json @@ -1,7 +1,6 @@ { "name": "mesa", - "version": "21.2.5", - "port-version": 3, + "version": "22.0.1", "description": "Mesa - The 3D Graphics Library", "homepage": "https://www.mesa3d.org/", "license": "MIT AND BSL-1.0 AND SGI-B-2.0", From 1d91f1d5c04ef8b150a1998739218da35a8b5583 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Thu, 14 Apr 2022 00:47:17 +0300 Subject: [PATCH 08/23] update versions --- versions/baseline.json | 6 +++--- versions/m-/mesa.json | 5 +++++ versions/v-/vcpkg-get-python-packages.json | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 1dfa4c2ab4af1e..2e1ad59adc4f69 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4445,8 +4445,8 @@ "port-version": 2 }, "mesa": { - "baseline": "21.2.5", - "port-version": 3 + "baseline": "22.0.1", + "port-version": 0 }, "meschach": { "baseline": "1.2b", @@ -7297,7 +7297,7 @@ "port-version": 0 }, "vcpkg-get-python-packages": { - "baseline": "2022-02-12", + "baseline": "2022-04-14", "port-version": 0 }, "vcpkg-gfortran": { diff --git a/versions/m-/mesa.json b/versions/m-/mesa.json index 37187a0e383f88..0aa5f5d6e0810c 100644 --- a/versions/m-/mesa.json +++ b/versions/m-/mesa.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "fc56f495c4b102c83dc322a57c27abae89fc8465", + "version": "22.0.1", + "port-version": 0 + }, { "git-tree": "aa75375f1cc9c3c4697c8fa8df4e647fb60f0125", "version": "21.2.5", diff --git a/versions/v-/vcpkg-get-python-packages.json b/versions/v-/vcpkg-get-python-packages.json index 6101d3fc2eccad..4a1b70e050ed51 100644 --- a/versions/v-/vcpkg-get-python-packages.json +++ b/versions/v-/vcpkg-get-python-packages.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "18f5ce76b7c1c2da4c464a3d88f4a35b33686f80", + "version-date": "2022-04-14", + "port-version": 0 + }, { "git-tree": "e429a4c957711115ea1b795327843acb05fc8b29", "version-date": "2022-02-12", From c2fd449b816e354227e43e930706c58e9f2509e3 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Thu, 14 Apr 2022 23:15:10 +0300 Subject: [PATCH 09/23] update versions --- versions/baseline.json | 10 +++++----- versions/m-/mesa.json | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 1790fdd1a8f382..3aca78e559f7d8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2713,7 +2713,7 @@ "port-version": 1 }, "halide": { - "baseline": "13.0.2", + "baseline": "14.0.0", "port-version": 0 }, "happly": { @@ -4253,8 +4253,8 @@ "port-version": 2 }, "llvm": { - "baseline": "13.0.0", - "port-version": 3 + "baseline": "14.0.0", + "port-version": 0 }, "lmdb": { "baseline": "0.9.29", @@ -4453,8 +4453,8 @@ "port-version": 2 }, "mesa": { - "baseline": "21.2.5", - "port-version": 4 + "baseline": "22.0.1", + "port-version": 0 }, "meschach": { "baseline": "1.2b", diff --git a/versions/m-/mesa.json b/versions/m-/mesa.json index 418d136588c168..3bcb4ed84193bb 100644 --- a/versions/m-/mesa.json +++ b/versions/m-/mesa.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1f16b4799131dc66a1d724a9917b979a6192dac4", + "version": "22.0.1", + "port-version": 0 + }, { "git-tree": "32925250dd7d2e060ca2cfe9fbda1d3f4312f29a", "version": "21.2.5", From 88cfbe50a23a990ad24990c6a5abac37a87a063f Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Fri, 22 Apr 2022 12:00:38 +0300 Subject: [PATCH 10/23] update version --- versions/baseline.json | 10 +++++----- versions/l-/llvm.json | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index dddcaa8b7acffa..a905bee4120469 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2713,7 +2713,7 @@ "port-version": 1 }, "halide": { - "baseline": "13.0.2", + "baseline": "14.0.0", "port-version": 0 }, "happly": { @@ -4253,8 +4253,8 @@ "port-version": 2 }, "llvm": { - "baseline": "13.0.0", - "port-version": 5 + "baseline": "14.0.0", + "port-version": 0 }, "lmdb": { "baseline": "0.9.29", @@ -4453,8 +4453,8 @@ "port-version": 2 }, "mesa": { - "baseline": "21.2.5", - "port-version": 4 + "baseline": "22.0.1", + "port-version": 0 }, "meschach": { "baseline": "1.2b", diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 09fea1d5e9b8d1..e1af97d4289891 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5757b9701fcf1c07bdacf0abd5cce9fcad3bb8e2", + "version": "14.0.0", + "port-version": 0 + }, { "git-tree": "1c835fcc79ad542a73ac25fd939556039ff75cd1", "version": "13.0.0", From f6f115436a0dae24d8df45a66fd8f78bd5ac51c9 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 25 Apr 2022 08:17:43 +0300 Subject: [PATCH 11/23] [mesa] update to 22.0.2 --- ports/mesa/portfile.cmake | 4 ++-- ports/mesa/vcpkg.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/mesa/portfile.cmake b/ports/mesa/portfile.cmake index f5453fbdc58fcc..03ee3c3d992353 100644 --- a/ports/mesa/portfile.cmake +++ b/ports/mesa/portfile.cmake @@ -20,8 +20,8 @@ vcpkg_from_gitlab( GITLAB_URL https://gitlab.freedesktop.org OUT_SOURCE_PATH SOURCE_PATH REPO mesa/mesa - REF mesa-22.0.1 - SHA512 afa72ccba680ed94438f51c6ba564c8461983f5b78065b4a1cc0d1ed90fe67eea8c56ba4066ed61a181fd8a5e49536b4f22b2be9c924976726aad04dd03b0dca + REF mesa-22.0.2 + SHA512 1139bae1fa9f9b49727c5aaddad9b2908c7643d7c6c435544e8322c84d17c012f04aa73876bef8cab9b517e36957eb2a678b3001da2d69a32497ef4569f6172e FILE_DISAMBIGUATOR 1 HEAD_REF master PATCHES ${PATCHES} diff --git a/ports/mesa/vcpkg.json b/ports/mesa/vcpkg.json index 12729db18fc417..6218984c0b0231 100644 --- a/ports/mesa/vcpkg.json +++ b/ports/mesa/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mesa", - "version": "22.0.1", + "version": "22.0.2", "description": "Mesa - The 3D Graphics Library", "homepage": "https://www.mesa3d.org/", "license": "MIT AND BSL-1.0 AND SGI-B-2.0", From e9ce06584c461b582f58e0b697fd6944cf38314a Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 25 Apr 2022 08:19:06 +0300 Subject: [PATCH 12/23] update version --- versions/baseline.json | 2 +- versions/m-/mesa.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index a905bee4120469..79a091e37fdb50 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4453,7 +4453,7 @@ "port-version": 2 }, "mesa": { - "baseline": "22.0.1", + "baseline": "22.0.2", "port-version": 0 }, "meschach": { diff --git a/versions/m-/mesa.json b/versions/m-/mesa.json index 3bcb4ed84193bb..441642e91a2177 100644 --- a/versions/m-/mesa.json +++ b/versions/m-/mesa.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "1f16b4799131dc66a1d724a9917b979a6192dac4", - "version": "22.0.1", + "git-tree": "dd57759f3e55a8739448b5e976a98f230df94e55", + "version": "22.0.2", "port-version": 0 }, { From cdd09eb52e80398462ae9384d832c898f5570f5a Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Wed, 27 Apr 2022 01:05:24 +0300 Subject: [PATCH 13/23] [mesa] update patches --- ports/mesa/def-fixes.patch | 1176 ++++++++++++++++++++---------------- 1 file changed, 664 insertions(+), 512 deletions(-) diff --git a/ports/mesa/def-fixes.patch b/ports/mesa/def-fixes.patch index e136112b61067b..6501872731d6fb 100644 --- a/ports/mesa/def-fixes.patch +++ b/ports/mesa/def-fixes.patch @@ -5,7 +5,7 @@ index 0000000000000000000000000000000000000000..dff8ab36f92ffbc18dbb2779563c25df +++ b/bin/gen_vs_module_defs.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 -+# Copyright © 2021-2021 Yonggang Luo ++# Copyright © 2021-2021 Yonggang Luo + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal @@ -114,10 +114,10 @@ index 000abef770966c4baecd0b47922f42c532a8c2cf..1b7301585f9e4b0f0556ce2ae11b03b1 symbols_check = find_program('symbols-check.py') install_megadrivers_py = find_program('install_megadrivers.py') diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build -index a1a29a31154fdb23f0fde2d31500f31834654171..2607b5bcd4ad140a4cc8f08b6a72ae63e47c2862 100644 +index 523782f281f650d0558af64a0c0a2bf77c217e1e..b6ecd999e71ab3ecb780af4fa2146c617e3c8e41 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build -@@ -150,12 +150,10 @@ if with_ld_version_script +@@ -149,12 +149,10 @@ if with_ld_version_script libvulkan_radeon_link_depends += files('vulkan.sym') endif @@ -278,6 +278,65 @@ index 315a95013f39b76a47067073f106eda518dc6b71..53044297322ad6ea3137bd1fe48b778a ) if not with_glvnd +diff --git a/src/gallium/frontends/d3d10umd/d3d10_sw.def b/src/gallium/frontends/d3d10umd/d3d10_sw.def +deleted file mode 100644 +index 5b76bfccefaabc9c09e000ffab579d1487a3a31c..0000000000000000000000000000000000000000 +--- a/src/gallium/frontends/d3d10umd/d3d10_sw.def ++++ /dev/null +@@ -1,53 +0,0 @@ +-EXPORTS +- OpenAdapter10 +- OpenAdapter10_2 +- D3DKMTAcquireKeyedMutex +- D3DKMTCloseAdapter +- D3DKMTConfigureSharedResource +- D3DKMTCreateAllocation +- D3DKMTCreateAllocation2 +- D3DKMTCreateContext +- D3DKMTCreateDevice +- D3DKMTCreateKeyedMutex +- D3DKMTCreateSynchronizationObject +- D3DKMTCreateSynchronizationObject2 +- D3DKMTDestroyAllocation +- D3DKMTDestroyContext +- D3DKMTDestroyDevice +- D3DKMTDestroyKeyedMutex +- D3DKMTDestroySynchronizationObject +- D3DKMTEscape +- D3DKMTGetContextSchedulingPriority +- ;D3DKMTGetDeviceSchedulingPriority +- D3DKMTGetDeviceState +- D3DKMTGetDisplayModeList +- D3DKMTGetMultisampleMethodList +- D3DKMTGetRuntimeData +- D3DKMTGetSharedPrimaryHandle +- D3DKMTLock +- D3DKMTOpenAdapterFromDeviceName +- D3DKMTOpenAdapterFromGdiDisplayName +- D3DKMTOpenKeyedMutex +- D3DKMTOpenResource +- D3DKMTOpenResource2 +- D3DKMTOpenSynchronizationObject +- D3DKMTPresent +- D3DKMTQueryAdapterInfo +- D3DKMTQueryAllocationResidency +- D3DKMTQueryResourceInfo +- D3DKMTReleaseKeyedMutex +- D3DKMTRender +- D3DKMTSetAllocationPriority +- D3DKMTSetContextSchedulingPriority +- ;D3DKMTSetDeviceSchedulingPriority +- D3DKMTSetDisplayMode +- D3DKMTSetDisplayPrivateDriverFormat +- D3DKMTSetGammaRamp +- D3DKMTSetVidPnSourceOwner +- D3DKMTSetVidPnSourceOwner1 +- D3DKMTSignalSynchronizationObject +- D3DKMTSignalSynchronizationObject2 +- D3DKMTUnlock +- D3DKMTWaitForSynchronizationObject +- D3DKMTWaitForSynchronizationObject2 +- D3DKMTWaitForVerticalBlankEvent diff --git a/src/gallium/frontends/osmesa/meson.build b/src/gallium/frontends/osmesa/meson.build index e5848fd9934afc22119a14122e6c2d095ab8f350..fe78a4daa31bb01bf8535ff4498172241e554610 100644 --- a/src/gallium/frontends/osmesa/meson.build @@ -291,22 +350,115 @@ index e5848fd9934afc22119a14122e6c2d095ab8f350..fe78a4daa31bb01bf8535ff449817224 if not with_shared_glapi osmesa_st_c_args += ['-D_GLAPI_NO_EXPORTS'] endif +diff --git a/src/gallium/targets/d3d10sw/d3d10_sw.def.in b/src/gallium/targets/d3d10sw/d3d10_sw.def.in +new file mode 100644 +index 0000000000000000000000000000000000000000..a81de54c4d285c67b1dd9a6da855a65446239831 +--- /dev/null ++++ b/src/gallium/targets/d3d10sw/d3d10_sw.def.in +@@ -0,0 +1,76 @@ ++; stdcall calling convention have @number suffix on 32 bits architecture for gcc ++OpenAdapter10@4 ++OpenAdapter10_2@4 ++D3DKMTAcquireKeyedMutex@4 ++;D3DKMTCheckExclusiveOwnership@0 ++;D3DKMTCheckMonitorPowerState@4 ++;D3DKMTCheckOcclusion@4 ++;D3DKMTCheckSharedResourceAccess@4 ++;D3DKMTCheckVidPnExclusiveOwnership@4 ++D3DKMTCloseAdapter@4 ++D3DKMTConfigureSharedResource@4 ++D3DKMTCreateAllocation2@4 ++D3DKMTCreateAllocation@4 ++D3DKMTCreateContext@4 ++;D3DKMTCreateDCFromMemory@4 ++D3DKMTCreateDevice@4 ++D3DKMTCreateKeyedMutex@4 ++;D3DKMTCreateOverlay@4 ++D3DKMTCreateSynchronizationObject2@4 ++D3DKMTCreateSynchronizationObject@4 ++D3DKMTDestroyAllocation@4 ++D3DKMTDestroyContext@4 ++;D3DKMTDestroyDCFromMemory@4 ++D3DKMTDestroyDevice@4 ++D3DKMTDestroyKeyedMutex@4 ++;D3DKMTDestroyOverlay@4 ++D3DKMTDestroySynchronizationObject@4 ++D3DKMTEscape@4 ++;D3DKMTFlipOverlay@4 ++D3DKMTGetContextSchedulingPriority@4 ++D3DKMTGetDeviceState@4 ++D3DKMTGetDisplayModeList@4 ++D3DKMTGetMultisampleMethodList@4 ++;D3DKMTGetOverlayState@4 ++;D3DKMTGetPresentHistory@4 ++;D3DKMTGetPresentQueueEvent@8 ++;D3DKMTGetProcessSchedulingPriorityClass@8 ++D3DKMTGetRuntimeData@4 ++;D3DKMTGetScanLine@4 ++D3DKMTGetSharedPrimaryHandle@4 ++;D3DKMTInvalidateActiveVidPn@4 ++D3DKMTLock@4 ++D3DKMTOpenAdapterFromDeviceName@4 ++D3DKMTOpenAdapterFromGdiDisplayName@4 ++;D3DKMTOpenAdapterFromHdc@4 ++D3DKMTOpenKeyedMutex@4 ++D3DKMTOpenResource2@4 ++D3DKMTOpenResource@4 ++D3DKMTOpenSynchronizationObject@4 ++;D3DKMTPollDisplayChildren@4 ++D3DKMTPresent@4 ++D3DKMTQueryAdapterInfo@4 ++D3DKMTQueryAllocationResidency@4 ++D3DKMTQueryResourceInfo@4 ++;D3DKMTQueryStatistics@4 ++D3DKMTReleaseKeyedMutex@4 ++;D3DKMTReleaseProcessVidPnSourceOwners@4 ++D3DKMTRender@4 ++D3DKMTSetAllocationPriority@4 ++D3DKMTSetContextSchedulingPriority@4 ++D3DKMTSetDisplayMode@4 ++D3DKMTSetDisplayPrivateDriverFormat@4 ++D3DKMTSetGammaRamp@4 ++;D3DKMTSetProcessSchedulingPriorityClass@8 ++;D3DKMTSetQueuedLimit@4 ++D3DKMTSetVidPnSourceOwner@4 ++;D3DKMTSharedPrimaryLockNotification@4 ++;D3DKMTSharedPrimaryUnLockNotification@4 ++D3DKMTSignalSynchronizationObject2@4 ++D3DKMTSignalSynchronizationObject@4 ++D3DKMTUnlock@4 ++;D3DKMTUpdateOverlay@4 ++;D3DKMTWaitForIdle@4 ++D3DKMTWaitForSynchronizationObject2@4 ++D3DKMTWaitForSynchronizationObject@4 ++D3DKMTWaitForVerticalBlankEvent@4 diff --git a/src/gallium/targets/d3d10sw/meson.build b/src/gallium/targets/d3d10sw/meson.build -index fe8632d3c7ff3f1a61a20f6bd88f25e697316e10..a5acb95c80eaeba0a92aa2d7e6cedd91658b56d2 100644 +index fe8632d3c7ff3f1a61a20f6bd88f25e697316e10..8b90c561152f96be787f838467d0e3407a1bd134 100644 --- a/src/gallium/targets/d3d10sw/meson.build +++ b/src/gallium/targets/d3d10sw/meson.build -@@ -20,10 +20,6 @@ +@@ -19,20 +19,22 @@ + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. - d3d10sw_def = files('../../frontends/d3d10umd/d3d10_sw.def')[0] +-d3d10sw_def = files('../../frontends/d3d10umd/d3d10_sw.def')[0] -_link_args_d3d10sw = [] -if cc.get_id() == 'gcc' - _link_args_d3d10sw += '-Wl,--enable-stdcall-fixup' -endif ++d3d10_sw_def = custom_target( ++ 'd3d10_sw.def', ++ input: 'd3d10_sw.def.in', ++ output : 'd3d10_sw.def', ++ command : [prog_python, gen_vs_module_defs_py, ++ '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', ++ '--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()] ++) libd3d10sw = shared_library( 'd3d10sw', -@@ -32,7 +28,6 @@ libd3d10sw = shared_library( + ['d3d10_gdi.c'], +- vs_module_defs : d3d10sw_def, ++ vs_module_defs : d3d10_sw_def, include_directories : [ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_d3d10umd, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers, ], @@ -2791,156 +2943,156 @@ index 92571a7c8f7bcf6847360bcd725732bd144f35c9..ace7c33eb9499a8058598570890d3e40 'gallium_wgl', diff --git a/src/mapi/es1api/gles1.def.in b/src/mapi/es1api/gles1.def.in new file mode 100644 -index 0000000000000000000000000000000000000000..35954aed7ad7ffc6709c5287a3f55c7e6cb0246e +index 0000000000000000000000000000000000000000..b09aff6a8739e1ce197f8abe481f4b79a94d3adb --- /dev/null +++ b/src/mapi/es1api/gles1.def.in @@ -0,0 +1,146 @@ +; stdcall calling convention have @number suffix on 32 bits architecture for gcc -+glActiveTexture -+glAlphaFunc -+glAlphaFuncx -+glBindBuffer -+glBindTexture -+glBlendFunc -+glBufferData -+glBufferSubData -+glClear -+glClearColor -+glClearColorx -+glClearDepthf -+glClearDepthx -+glClearStencil -+glClientActiveTexture -+glClipPlanef -+glClipPlanex -+glColor4f -+glColor4ub -+glColor4x -+glColorMask -+glColorPointer -+glCompressedTexImage2D -+glCompressedTexSubImage2D -+glCopyTexImage2D -+glCopyTexSubImage2D -+glCullFace -+glDeleteBuffers -+glDeleteTextures -+glDepthFunc -+glDepthMask -+glDepthRangef -+glDepthRangex -+glDisable -+glDisableClientState -+glDrawArrays -+glDrawElements -+glEnable -+glEnableClientState -+glFinish -+glFlush -+glFogf -+glFogfv -+glFogx -+glFogxv -+glFrontFace -+glFrustumf -+glFrustumx -+glGenBuffers -+glGenTextures -+glGetBooleanv -+glGetBufferParameteriv -+glGetClipPlanef -+glGetClipPlanex -+glGetError -+glGetFixedv -+glGetFloatv -+glGetIntegerv -+glGetLightfv -+glGetLightxv -+glGetMaterialfv -+glGetMaterialxv -+glGetPointerv -+glGetString -+glGetTexEnvfv -+glGetTexEnviv -+glGetTexEnvxv -+glGetTexParameterfv -+glGetTexParameteriv -+glGetTexParameterxv -+glHint -+glIsBuffer -+glIsEnabled -+glIsTexture -+glLightf -+glLightfv -+glLightModelf -+glLightModelfv -+glLightModelx -+glLightModelxv -+glLightx -+glLightxv -+glLineWidth -+glLineWidthx -+glLoadIdentity -+glLoadMatrixf -+glLoadMatrixx -+glLogicOp -+glMaterialf -+glMaterialfv -+glMaterialx -+glMaterialxv -+glMatrixMode -+glMultiTexCoord4f -+glMultiTexCoord4x -+glMultMatrixf -+glMultMatrixx -+glNormal3f -+glNormal3x -+glNormalPointer -+glOrthof -+glOrthox -+glPixelStorei -+glPointParameterf -+glPointParameterfv -+glPointParameterx -+glPointParameterxv -+glPointSize -+glPointSizePointerOES -+glPointSizex -+glPolygonOffset -+glPolygonOffsetx -+glPopMatrix -+glPushMatrix -+glReadPixels -+glRotatef -+glRotatex -+glSampleCoverage -+glSampleCoveragex -+glScalef -+glScalex -+glScissor -+glShadeModel -+glStencilFunc -+glStencilMask -+glStencilOp -+glTexCoordPointer -+glTexEnvf -+glTexEnvfv -+glTexEnvi -+glTexEnviv -+glTexEnvx -+glTexEnvxv -+glTexImage2D -+glTexParameterf -+glTexParameterfv -+glTexParameteri -+glTexParameteriv -+glTexParameterx -+glTexParameterxv -+glTexSubImage2D -+glTranslatef -+glTranslatex -+glVertexPointer -+glViewport ++glActiveTexture@4 ++glAlphaFunc@8 ++glAlphaFuncx@8 ++glBindBuffer@8 ++glBindTexture@8 ++glBlendFunc@8 ++glBufferData@16 ++glBufferSubData@16 ++glClear@4 ++glClearColor@16 ++glClearColorx@16 ++glClearDepthf@4 ++glClearDepthx@4 ++glClearStencil@4 ++glClientActiveTexture@4 ++glClipPlanef@8 ++glClipPlanex@8 ++glColor4f@16 ++glColor4ub@16 ++glColor4x@16 ++glColorMask@16 ++glColorPointer@16 ++glCompressedTexImage2D@32 ++glCompressedTexSubImage2D@36 ++glCopyTexImage2D@32 ++glCopyTexSubImage2D@32 ++glCullFace@4 ++glDeleteBuffers@8 ++glDeleteTextures@8 ++glDepthFunc@4 ++glDepthMask@4 ++glDepthRangef@8 ++glDepthRangex@8 ++glDisable@4 ++glDisableClientState@4 ++glDrawArrays@12 ++glDrawElements@16 ++glEnable@4 ++glEnableClientState@4 ++glFinish@0 ++glFlush@0 ++glFogf@8 ++glFogfv@8 ++glFogx@8 ++glFogxv@8 ++glFrontFace@4 ++glFrustumf@24 ++glFrustumx@24 ++glGenBuffers@8 ++glGenTextures@8 ++glGetBooleanv@8 ++glGetBufferParameteriv@12 ++glGetClipPlanef@8 ++glGetClipPlanex@8 ++glGetError@0 ++glGetFixedv@8 ++glGetFloatv@8 ++glGetIntegerv@8 ++glGetLightfv@12 ++glGetLightxv@12 ++glGetMaterialfv@12 ++glGetMaterialxv@12 ++glGetPointerv@8 ++glGetString@4 ++glGetTexEnvfv@12 ++glGetTexEnviv@12 ++glGetTexEnvxv@12 ++glGetTexParameterfv@12 ++glGetTexParameteriv@12 ++glGetTexParameterxv@12 ++glHint@8 ++glIsBuffer@4 ++glIsEnabled@4 ++glIsTexture@4 ++glLightModelf@8 ++glLightModelfv@8 ++glLightModelx@8 ++glLightModelxv@8 ++glLightf@12 ++glLightfv@12 ++glLightx@12 ++glLightxv@12 ++glLineWidth@4 ++glLineWidthx@4 ++glLoadIdentity@0 ++glLoadMatrixf@4 ++glLoadMatrixx@4 ++glLogicOp@4 ++glMaterialf@12 ++glMaterialfv@12 ++glMaterialx@12 ++glMaterialxv@12 ++glMatrixMode@4 ++glMultMatrixf@4 ++glMultMatrixx@4 ++glMultiTexCoord4f@20 ++glMultiTexCoord4x@20 ++glNormal3f@12 ++glNormal3x@12 ++glNormalPointer@12 ++glOrthof@24 ++glOrthox@24 ++glPixelStorei@8 ++glPointParameterf@8 ++glPointParameterfv@8 ++glPointParameterx@8 ++glPointParameterxv@8 ++glPointSize@4 ++glPointSizePointerOES@12 ++glPointSizex@4 ++glPolygonOffset@8 ++glPolygonOffsetx@8 ++glPopMatrix@0 ++glPushMatrix@0 ++glReadPixels@28 ++glRotatef@16 ++glRotatex@16 ++glSampleCoverage@8 ++glSampleCoveragex@8 ++glScalef@12 ++glScalex@12 ++glScissor@16 ++glShadeModel@4 ++glStencilFunc@12 ++glStencilMask@4 ++glStencilOp@12 ++glTexCoordPointer@16 ++glTexEnvf@12 ++glTexEnvfv@12 ++glTexEnvi@12 ++glTexEnviv@12 ++glTexEnvx@12 ++glTexEnvxv@12 ++glTexImage2D@36 ++glTexParameterf@12 ++glTexParameterfv@12 ++glTexParameteri@12 ++glTexParameteriv@12 ++glTexParameterx@12 ++glTexParameterxv@12 ++glTexSubImage2D@36 ++glTranslatef@12 ++glTranslatex@12 ++glVertexPointer@16 ++glViewport@16 diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build index 8b749b1a3324be96f0d69816e638f1131ec8c307..4bca37b5e32f77d55655c49ca0580b75707edc6b 100644 --- a/src/mapi/es1api/meson.build @@ -2971,369 +3123,369 @@ index 8b749b1a3324be96f0d69816e638f1131ec8c307..4bca37b5e32f77d55655c49ca0580b75 _es1_c_args, diff --git a/src/mapi/es2api/gles2.def.in b/src/mapi/es2api/gles2.def.in new file mode 100644 -index 0000000000000000000000000000000000000000..a6b2abc06350550397e66a6ce032b546f6b39569 +index 0000000000000000000000000000000000000000..4517ea8b739e72d950930ee94b51dc71829dea8e --- /dev/null +++ b/src/mapi/es2api/gles2.def.in @@ -0,0 +1,359 @@ +; stdcall calling convention have @number suffix on 32 bits architecture for gcc -+glActiveShaderProgram -+glActiveTexture -+glAttachShader -+glBeginQuery -+glBeginTransformFeedback -+glBindAttribLocation -+glBindBuffer -+glBindBufferBase -+glBindBufferRange -+glBindFramebuffer -+glBindImageTexture -+glBindProgramPipeline -+glBindRenderbuffer -+glBindSampler -+glBindTexture -+glBindTransformFeedback -+glBindVertexArray -+glBindVertexBuffer -+glBlendBarrier -+glBlendColor -+glBlendEquation -+glBlendEquationSeparate -+glBlendEquationSeparatei -+glBlendEquationi -+glBlendFunc -+glBlendFuncSeparate -+glBlendFuncSeparatei -+glBlendFunci -+glBlitFramebuffer -+glBufferData -+glBufferSubData -+glCheckFramebufferStatus -+glClear -+glClearBufferfi -+glClearBufferfv -+glClearBufferiv -+glClearBufferuiv -+glClearColor -+glClearDepthf -+glClearStencil -+glClientWaitSync -+glColorMask -+glColorMaski -+glCompileShader -+glCompressedTexImage2D -+glCompressedTexImage3D -+glCompressedTexSubImage2D -+glCompressedTexSubImage3D -+glCopyBufferSubData -+glCopyImageSubData -+glCopyTexImage2D -+glCopyTexSubImage2D -+glCopyTexSubImage3D -+glCreateProgram -+glCreateShader -+glCreateShaderProgramv -+glCullFace -+glDebugMessageCallback -+glDebugMessageControl -+glDebugMessageInsert -+glDeleteBuffers -+glDeleteFramebuffers -+glDeleteProgram -+glDeleteProgramPipelines -+glDeleteQueries -+glDeleteRenderbuffers -+glDeleteSamplers -+glDeleteShader -+glDeleteSync -+glDeleteTextures -+glDeleteTransformFeedbacks -+glDeleteVertexArrays -+glDepthFunc -+glDepthMask -+glDepthRangef -+glDetachShader -+glDisable -+glDisableVertexAttribArray -+glDisablei -+glDispatchCompute -+glDispatchComputeIndirect -+glDrawArrays -+glDrawArraysIndirect -+glDrawArraysInstanced -+glDrawBuffers -+glDrawElements -+glDrawElementsBaseVertex -+glDrawElementsIndirect -+glDrawElementsInstanced -+glDrawElementsInstancedBaseVertex -+glDrawRangeElements -+glDrawRangeElementsBaseVertex -+glEnable -+glEnableVertexAttribArray -+glEnablei -+glEndQuery -+glEndTransformFeedback -+glFenceSync -+glFinish -+glFlush -+glFlushMappedBufferRange -+glFramebufferParameteri -+glFramebufferRenderbuffer -+glFramebufferTexture -+glFramebufferTexture2D -+glFramebufferTextureLayer -+glFrontFace -+glGenBuffers -+glGenFramebuffers -+glGenProgramPipelines -+glGenQueries -+glGenRenderbuffers -+glGenSamplers -+glGenTextures -+glGenTransformFeedbacks -+glGenVertexArrays -+glGenerateMipmap -+glGetActiveAttrib -+glGetActiveUniform -+glGetActiveUniformBlockName -+glGetActiveUniformBlockiv -+glGetActiveUniformsiv -+glGetAttachedShaders -+glGetAttribLocation -+glGetBooleani_v -+glGetBooleanv -+glGetBufferParameteri64v -+glGetBufferParameteriv -+glGetBufferPointerv -+glGetDebugMessageLog -+glGetError -+glGetFloatv -+glGetFragDataLocation -+glGetFramebufferAttachmentParameteriv -+glGetFramebufferParameteriv -+glGetGraphicsResetStatus -+glGetInteger64i_v -+glGetInteger64v -+glGetIntegeri_v -+glGetIntegerv -+glGetInternalformativ -+glGetMultisamplefv -+glGetObjectLabel -+glGetObjectPtrLabel -+glGetPointerv -+glGetProgramBinary -+glGetProgramInfoLog -+glGetProgramInterfaceiv -+glGetProgramPipelineInfoLog -+glGetProgramPipelineiv -+glGetProgramResourceIndex -+glGetProgramResourceLocation -+glGetProgramResourceName -+glGetProgramResourceiv -+glGetProgramiv -+glGetQueryObjectuiv -+glGetQueryiv -+glGetRenderbufferParameteriv -+glGetSamplerParameterIiv -+glGetSamplerParameterIuiv -+glGetSamplerParameterfv -+glGetSamplerParameteriv -+glGetShaderInfoLog -+glGetShaderPrecisionFormat -+glGetShaderSource -+glGetShaderiv -+glGetString -+glGetStringi -+glGetSynciv -+glGetTexLevelParameterfv -+glGetTexLevelParameteriv -+glGetTexParameterIiv -+glGetTexParameterIuiv -+glGetTexParameterfv -+glGetTexParameteriv -+glGetTransformFeedbackVarying -+glGetUniformBlockIndex -+glGetUniformIndices -+glGetUniformLocation -+glGetUniformfv -+glGetUniformiv -+glGetUniformuiv -+glGetVertexAttribIiv -+glGetVertexAttribIuiv -+glGetVertexAttribPointerv -+glGetVertexAttribfv -+glGetVertexAttribiv -+glGetnUniformfv -+glGetnUniformiv -+glGetnUniformuiv -+glHint -+glInvalidateFramebuffer -+glInvalidateSubFramebuffer -+glIsBuffer -+glIsEnabled -+glIsEnabledi -+glIsFramebuffer -+glIsProgram -+glIsProgramPipeline -+glIsQuery -+glIsRenderbuffer -+glIsSampler -+glIsShader -+glIsSync -+glIsTexture -+glIsTransformFeedback -+glIsVertexArray -+glLineWidth -+glLinkProgram -+glMapBufferRange -+glMemoryBarrier -+glMemoryBarrierByRegion -+glMinSampleShading -+glObjectLabel -+glObjectPtrLabel -+glPatchParameteri -+glPauseTransformFeedback -+glPixelStorei -+glPolygonOffset -+glPopDebugGroup -+glPrimitiveBoundingBox -+glProgramBinary -+glProgramParameteri -+glProgramUniform1f -+glProgramUniform1fv -+glProgramUniform1i -+glProgramUniform1iv -+glProgramUniform1ui -+glProgramUniform1uiv -+glProgramUniform2f -+glProgramUniform2fv -+glProgramUniform2i -+glProgramUniform2iv -+glProgramUniform2ui -+glProgramUniform2uiv -+glProgramUniform3f -+glProgramUniform3fv -+glProgramUniform3i -+glProgramUniform3iv -+glProgramUniform3ui -+glProgramUniform3uiv -+glProgramUniform4f -+glProgramUniform4fv -+glProgramUniform4i -+glProgramUniform4iv -+glProgramUniform4ui -+glProgramUniform4uiv -+glProgramUniformMatrix2fv -+glProgramUniformMatrix2x3fv -+glProgramUniformMatrix2x4fv -+glProgramUniformMatrix3fv -+glProgramUniformMatrix3x2fv -+glProgramUniformMatrix3x4fv -+glProgramUniformMatrix4fv -+glProgramUniformMatrix4x2fv -+glProgramUniformMatrix4x3fv -+glPushDebugGroup -+glReadBuffer -+glReadPixels -+glReadnPixels -+glReleaseShaderCompiler -+glRenderbufferStorage -+glRenderbufferStorageMultisample -+glResumeTransformFeedback -+glSampleCoverage -+glSampleMaski -+glSamplerParameterIiv -+glSamplerParameterIuiv -+glSamplerParameterf -+glSamplerParameterfv -+glSamplerParameteri -+glSamplerParameteriv -+glScissor -+glShaderBinary -+glShaderSource -+glStencilFunc -+glStencilFuncSeparate -+glStencilMask -+glStencilMaskSeparate -+glStencilOp -+glStencilOpSeparate -+glTexBuffer -+glTexBufferRange -+glTexImage2D -+glTexImage3D -+glTexParameterIiv -+glTexParameterIuiv -+glTexParameterf -+glTexParameterfv -+glTexParameteri -+glTexParameteriv -+glTexStorage2D -+glTexStorage2DMultisample -+glTexStorage3D -+glTexStorage3DMultisample -+glTexSubImage2D -+glTexSubImage3D -+glTransformFeedbackVaryings -+glUniform1f -+glUniform1fv -+glUniform1i -+glUniform1iv -+glUniform1ui -+glUniform1uiv -+glUniform2f -+glUniform2fv -+glUniform2i -+glUniform2iv -+glUniform2ui -+glUniform2uiv -+glUniform3f -+glUniform3fv -+glUniform3i -+glUniform3iv -+glUniform3ui -+glUniform3uiv -+glUniform4f -+glUniform4fv -+glUniform4i -+glUniform4iv -+glUniform4ui -+glUniform4uiv -+glUniformBlockBinding -+glUniformMatrix2fv -+glUniformMatrix2x3fv -+glUniformMatrix2x4fv -+glUniformMatrix3fv -+glUniformMatrix3x2fv -+glUniformMatrix3x4fv -+glUniformMatrix4fv -+glUniformMatrix4x2fv -+glUniformMatrix4x3fv -+glUnmapBuffer -+glUseProgram -+glUseProgramStages -+glValidateProgram -+glValidateProgramPipeline -+glVertexAttrib1f -+glVertexAttrib1fv -+glVertexAttrib2f -+glVertexAttrib2fv -+glVertexAttrib3f -+glVertexAttrib3fv -+glVertexAttrib4f -+glVertexAttrib4fv -+glVertexAttribBinding -+glVertexAttribDivisor -+glVertexAttribFormat -+glVertexAttribI4i -+glVertexAttribI4iv -+glVertexAttribI4ui -+glVertexAttribI4uiv -+glVertexAttribIFormat -+glVertexAttribIPointer -+glVertexAttribPointer -+glVertexBindingDivisor -+glViewport -+glWaitSync ++glActiveShaderProgram@8 ++glActiveTexture@4 ++glAttachShader@8 ++glBeginQuery@8 ++glBeginTransformFeedback@4 ++glBindAttribLocation@12 ++glBindBuffer@8 ++glBindBufferBase@12 ++glBindBufferRange@20 ++glBindFramebuffer@8 ++glBindImageTexture@28 ++glBindProgramPipeline@4 ++glBindRenderbuffer@8 ++glBindSampler@8 ++glBindTexture@8 ++glBindTransformFeedback@8 ++glBindVertexArray@4 ++glBindVertexBuffer@16 ++glBlendBarrier@0 ++glBlendColor@16 ++glBlendEquation@4 ++glBlendEquationSeparate@8 ++glBlendEquationSeparatei@12 ++glBlendEquationi@8 ++glBlendFunc@8 ++glBlendFuncSeparate@16 ++glBlendFuncSeparatei@20 ++glBlendFunci@12 ++glBlitFramebuffer@40 ++glBufferData@16 ++glBufferSubData@16 ++glCheckFramebufferStatus@4 ++glClear@4 ++glClearBufferfi@16 ++glClearBufferfv@12 ++glClearBufferiv@12 ++glClearBufferuiv@12 ++glClearColor@16 ++glClearDepthf@4 ++glClearStencil@4 ++glClientWaitSync@16 ++glColorMask@16 ++glColorMaski@20 ++glCompileShader@4 ++glCompressedTexImage2D@32 ++glCompressedTexImage3D@36 ++glCompressedTexSubImage2D@36 ++glCompressedTexSubImage3D@44 ++glCopyBufferSubData@20 ++glCopyImageSubData@60 ++glCopyTexImage2D@32 ++glCopyTexSubImage2D@32 ++glCopyTexSubImage3D@36 ++glCreateProgram@0 ++glCreateShader@4 ++glCreateShaderProgramv@12 ++glCullFace@4 ++glDebugMessageCallback@8 ++glDebugMessageControl@24 ++glDebugMessageInsert@24 ++glDeleteBuffers@8 ++glDeleteFramebuffers@8 ++glDeleteProgram@4 ++glDeleteProgramPipelines@8 ++glDeleteQueries@8 ++glDeleteRenderbuffers@8 ++glDeleteSamplers@8 ++glDeleteShader@4 ++glDeleteSync@4 ++glDeleteTextures@8 ++glDeleteTransformFeedbacks@8 ++glDeleteVertexArrays@8 ++glDepthFunc@4 ++glDepthMask@4 ++glDepthRangef@8 ++glDetachShader@8 ++glDisable@4 ++glDisableVertexAttribArray@4 ++glDisablei@8 ++glDispatchCompute@12 ++glDispatchComputeIndirect@4 ++glDrawArrays@12 ++glDrawArraysIndirect@8 ++glDrawArraysInstanced@16 ++glDrawBuffers@8 ++glDrawElements@16 ++glDrawElementsBaseVertex@20 ++glDrawElementsIndirect@12 ++glDrawElementsInstanced@20 ++glDrawElementsInstancedBaseVertex@24 ++glDrawRangeElements@24 ++glDrawRangeElementsBaseVertex@28 ++glEnable@4 ++glEnableVertexAttribArray@4 ++glEnablei@8 ++glEndQuery@4 ++glEndTransformFeedback@0 ++glFenceSync@8 ++glFinish@0 ++glFlush@0 ++glFlushMappedBufferRange@12 ++glFramebufferParameteri@12 ++glFramebufferRenderbuffer@16 ++glFramebufferTexture2D@20 ++glFramebufferTexture@16 ++glFramebufferTextureLayer@20 ++glFrontFace@4 ++glGenBuffers@8 ++glGenFramebuffers@8 ++glGenProgramPipelines@8 ++glGenQueries@8 ++glGenRenderbuffers@8 ++glGenSamplers@8 ++glGenTextures@8 ++glGenTransformFeedbacks@8 ++glGenVertexArrays@8 ++glGenerateMipmap@4 ++glGetActiveAttrib@28 ++glGetActiveUniform@28 ++glGetActiveUniformBlockName@20 ++glGetActiveUniformBlockiv@16 ++glGetActiveUniformsiv@20 ++glGetAttachedShaders@16 ++glGetAttribLocation@8 ++glGetBooleani_v@12 ++glGetBooleanv@8 ++glGetBufferParameteri64v@12 ++glGetBufferParameteriv@12 ++glGetBufferPointerv@12 ++glGetDebugMessageLog@32 ++glGetError@0 ++glGetFloatv@8 ++glGetFragDataLocation@8 ++glGetFramebufferAttachmentParameteriv@16 ++glGetFramebufferParameteriv@12 ++glGetGraphicsResetStatus@0 ++glGetInteger64i_v@12 ++glGetInteger64v@8 ++glGetIntegeri_v@12 ++glGetIntegerv@8 ++glGetInternalformativ@20 ++glGetMultisamplefv@12 ++glGetObjectLabel@20 ++glGetObjectPtrLabel@16 ++glGetPointerv@8 ++glGetProgramBinary@20 ++glGetProgramInfoLog@16 ++glGetProgramInterfaceiv@16 ++glGetProgramPipelineInfoLog@16 ++glGetProgramPipelineiv@12 ++glGetProgramResourceIndex@12 ++glGetProgramResourceLocation@12 ++glGetProgramResourceName@24 ++glGetProgramResourceiv@32 ++glGetProgramiv@12 ++glGetQueryObjectuiv@12 ++glGetQueryiv@12 ++glGetRenderbufferParameteriv@12 ++glGetSamplerParameterIiv@12 ++glGetSamplerParameterIuiv@12 ++glGetSamplerParameterfv@12 ++glGetSamplerParameteriv@12 ++glGetShaderInfoLog@16 ++glGetShaderPrecisionFormat@16 ++glGetShaderSource@16 ++glGetShaderiv@12 ++glGetString@4 ++glGetStringi@8 ++glGetSynciv@20 ++glGetTexLevelParameterfv@16 ++glGetTexLevelParameteriv@16 ++glGetTexParameterIiv@12 ++glGetTexParameterIuiv@12 ++glGetTexParameterfv@12 ++glGetTexParameteriv@12 ++glGetTransformFeedbackVarying@28 ++glGetUniformBlockIndex@8 ++glGetUniformIndices@16 ++glGetUniformLocation@8 ++glGetUniformfv@12 ++glGetUniformiv@12 ++glGetUniformuiv@12 ++glGetVertexAttribIiv@12 ++glGetVertexAttribIuiv@12 ++glGetVertexAttribPointerv@12 ++glGetVertexAttribfv@12 ++glGetVertexAttribiv@12 ++glGetnUniformfv@16 ++glGetnUniformiv@16 ++glGetnUniformuiv@16 ++glHint@8 ++glInvalidateFramebuffer@12 ++glInvalidateSubFramebuffer@28 ++glIsBuffer@4 ++glIsEnabled@4 ++glIsEnabledi@8 ++glIsFramebuffer@4 ++glIsProgram@4 ++glIsProgramPipeline@4 ++glIsQuery@4 ++glIsRenderbuffer@4 ++glIsSampler@4 ++glIsShader@4 ++glIsSync@4 ++glIsTexture@4 ++glIsTransformFeedback@4 ++glIsVertexArray@4 ++glLineWidth@4 ++glLinkProgram@4 ++glMapBufferRange@16 ++glMemoryBarrier@4 ++glMemoryBarrierByRegion@4 ++glMinSampleShading@4 ++glObjectLabel@16 ++glObjectPtrLabel@12 ++glPatchParameteri@8 ++glPauseTransformFeedback@0 ++glPixelStorei@8 ++glPolygonOffset@8 ++glPopDebugGroup@0 ++glPrimitiveBoundingBox@32 ++glProgramBinary@16 ++glProgramParameteri@12 ++glProgramUniform1f@12 ++glProgramUniform1fv@16 ++glProgramUniform1i@12 ++glProgramUniform1iv@16 ++glProgramUniform1ui@12 ++glProgramUniform1uiv@16 ++glProgramUniform2f@16 ++glProgramUniform2fv@16 ++glProgramUniform2i@16 ++glProgramUniform2iv@16 ++glProgramUniform2ui@16 ++glProgramUniform2uiv@16 ++glProgramUniform3f@20 ++glProgramUniform3fv@16 ++glProgramUniform3i@20 ++glProgramUniform3iv@16 ++glProgramUniform3ui@20 ++glProgramUniform3uiv@16 ++glProgramUniform4f@24 ++glProgramUniform4fv@16 ++glProgramUniform4i@24 ++glProgramUniform4iv@16 ++glProgramUniform4ui@24 ++glProgramUniform4uiv@16 ++glProgramUniformMatrix2fv@20 ++glProgramUniformMatrix2x3fv@20 ++glProgramUniformMatrix2x4fv@20 ++glProgramUniformMatrix3fv@20 ++glProgramUniformMatrix3x2fv@20 ++glProgramUniformMatrix3x4fv@20 ++glProgramUniformMatrix4fv@20 ++glProgramUniformMatrix4x2fv@20 ++glProgramUniformMatrix4x3fv@20 ++glPushDebugGroup@16 ++glReadBuffer@4 ++glReadPixels@28 ++glReadnPixels@32 ++glReleaseShaderCompiler@0 ++glRenderbufferStorage@16 ++glRenderbufferStorageMultisample@20 ++glResumeTransformFeedback@0 ++glSampleCoverage@8 ++glSampleMaski@8 ++glSamplerParameterIiv@12 ++glSamplerParameterIuiv@12 ++glSamplerParameterf@12 ++glSamplerParameterfv@12 ++glSamplerParameteri@12 ++glSamplerParameteriv@12 ++glScissor@16 ++glShaderBinary@20 ++glShaderSource@16 ++glStencilFunc@12 ++glStencilFuncSeparate@16 ++glStencilMask@4 ++glStencilMaskSeparate@8 ++glStencilOp@12 ++glStencilOpSeparate@16 ++glTexBuffer@12 ++glTexBufferRange@20 ++glTexImage2D@36 ++glTexImage3D@40 ++glTexParameterIiv@12 ++glTexParameterIuiv@12 ++glTexParameterf@12 ++glTexParameterfv@12 ++glTexParameteri@12 ++glTexParameteriv@12 ++glTexStorage2D@20 ++glTexStorage2DMultisample@24 ++glTexStorage3D@24 ++glTexStorage3DMultisample@28 ++glTexSubImage2D@36 ++glTexSubImage3D@44 ++glTransformFeedbackVaryings@16 ++glUniform1f@8 ++glUniform1fv@12 ++glUniform1i@8 ++glUniform1iv@12 ++glUniform1ui@8 ++glUniform1uiv@12 ++glUniform2f@12 ++glUniform2fv@12 ++glUniform2i@12 ++glUniform2iv@12 ++glUniform2ui@12 ++glUniform2uiv@12 ++glUniform3f@16 ++glUniform3fv@12 ++glUniform3i@16 ++glUniform3iv@12 ++glUniform3ui@16 ++glUniform3uiv@12 ++glUniform4f@20 ++glUniform4fv@12 ++glUniform4i@20 ++glUniform4iv@12 ++glUniform4ui@20 ++glUniform4uiv@12 ++glUniformBlockBinding@12 ++glUniformMatrix2fv@16 ++glUniformMatrix2x3fv@16 ++glUniformMatrix2x4fv@16 ++glUniformMatrix3fv@16 ++glUniformMatrix3x2fv@16 ++glUniformMatrix3x4fv@16 ++glUniformMatrix4fv@16 ++glUniformMatrix4x2fv@16 ++glUniformMatrix4x3fv@16 ++glUnmapBuffer@4 ++glUseProgram@4 ++glUseProgramStages@12 ++glValidateProgram@4 ++glValidateProgramPipeline@4 ++glVertexAttrib1f@8 ++glVertexAttrib1fv@8 ++glVertexAttrib2f@12 ++glVertexAttrib2fv@8 ++glVertexAttrib3f@16 ++glVertexAttrib3fv@8 ++glVertexAttrib4f@20 ++glVertexAttrib4fv@8 ++glVertexAttribBinding@8 ++glVertexAttribDivisor@8 ++glVertexAttribFormat@20 ++glVertexAttribI4i@20 ++glVertexAttribI4iv@8 ++glVertexAttribI4ui@20 ++glVertexAttribI4uiv@8 ++glVertexAttribIFormat@16 ++glVertexAttribIPointer@20 ++glVertexAttribPointer@24 ++glVertexBindingDivisor@8 ++glViewport@16 ++glWaitSync@16 diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build index 356c5760c495e5b8a52abc2c841741f9b2b47222..8b133daa131276025072b4a85318e423206981cc 100644 --- a/src/mapi/es2api/meson.build From 336d51990b1aeb9d8bd06bdad36a6ddf8fd8bc0e Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Wed, 27 Apr 2022 01:05:51 +0300 Subject: [PATCH 14/23] update version --- versions/m-/mesa.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mesa.json b/versions/m-/mesa.json index 441642e91a2177..47f3b1968ea992 100644 --- a/versions/m-/mesa.json +++ b/versions/m-/mesa.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dd57759f3e55a8739448b5e976a98f230df94e55", + "git-tree": "7df282d97d0ef5ec5a19b770dced8cd773e570c0", "version": "22.0.2", "port-version": 0 }, From 1503fb0088cf5f2051df03d4584085d0cc65c30a Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sat, 30 Apr 2022 09:32:07 +0300 Subject: [PATCH 15/23] [llvm] update to v14.0.3 --- ports/llvm/portfile.cmake | 4 ++-- ports/llvm/vcpkg.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 8f719bfcec56f7..5b9c322107562f 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,4 +1,4 @@ -set(LLVM_VERSION "14.0.0") +set(LLVM_VERSION "14.0.3") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -6,7 +6,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llvm/llvm-project REF llvmorg-${LLVM_VERSION} - SHA512 eb5acf96b5e2c59bd07579f7ebe73018b0dd6e2f2d9a5a3c7986320e88febd837d1084b9e5313a2264310342193044629d228337cc76dd2b8527dc0a8bdda999 + SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646 HEAD_REF master PATCHES 0002-fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc. diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 8cef93bc18fc4a..0e6c9e37c74c88 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -1,6 +1,6 @@ { "name": "llvm", - "version": "14.0.0", + "version": "14.0.3", "description": "The LLVM Compiler Infrastructure.", "homepage": "https://llvm.org", "license": "Apache-2.0", From 95d4b51cd2702cf310c0df06fa029fba902b74f3 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sat, 30 Apr 2022 09:36:43 +0300 Subject: [PATCH 16/23] update version --- versions/baseline.json | 2 +- versions/l-/llvm.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 79a091e37fdb50..17763ecf7a93e6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4253,7 +4253,7 @@ "port-version": 2 }, "llvm": { - "baseline": "14.0.0", + "baseline": "14.0.3", "port-version": 0 }, "lmdb": { diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index e1af97d4289891..743f4d675b31c7 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "5757b9701fcf1c07bdacf0abd5cce9fcad3bb8e2", - "version": "14.0.0", + "git-tree": "cf39577c60b00f85d104832344349d51a2551c9f", + "version": "14.0.3", "port-version": 0 }, { From a05f93f460c5663c45a7df4974c00f5a2225b8f5 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 2 May 2022 17:41:14 +0300 Subject: [PATCH 17/23] [llvm] remove depricated feature --- ports/llvm/vcpkg.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 0e6c9e37c74c88..094be0231ead9e 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -61,7 +61,6 @@ "name": "llvm", "default-features": false, "features": [ - "disable-abi-breaking-checks", "disable-assertions", "disable-clang-static-analyzer", "enable-bindings", @@ -109,9 +108,6 @@ } ] }, - "disable-abi-breaking-checks": { - "description": "Deprecated; this is the default" - }, "disable-assertions": { "description": "Build LLVM without assertions." }, From 7d8e1daecb85da8510c5d6674290e46a9afbdd3f Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 2 May 2022 18:20:50 +0300 Subject: [PATCH 18/23] [llvm] allow to build OpenMP on Windows and remove incomplete cross-compile support --- ports/llvm/portfile.cmake | 35 --------------------- scripts/test_ports/vcpkg-ci-llvm/vcpkg.json | 1 + 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 5b9c322107562f..e400aab9d50a93 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -142,20 +142,11 @@ if("mlir" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "mlir") endif() if("openmp" IN_LIST FEATURES) - # Disable OpenMP on Windows (see https://bugs.llvm.org/show_bug.cgi?id=45074). - if(VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "Building OpenMP with MSVC is not supported. Disable it until issues are fixed.") - endif() list(APPEND LLVM_ENABLE_PROJECTS "openmp") # Perl is required for the OpenMP run-time vcpkg_find_acquire_program(PERL) get_filename_component(PERL_PATH ${PERL} DIRECTORY) vcpkg_add_to_path(${PERL_PATH}) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - list(APPEND FEATURE_OPTIONS - -DLIBOMP_DEFAULT_LIB_NAME=libompd - ) - endif() endif() if("polly" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "polly") @@ -217,36 +208,10 @@ vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) vcpkg_add_to_path(${PYTHON3_DIR}) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "${VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR}") - # TODO: support more targets and OS - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - if(VCPKG_TARGET_IS_OSX) - list(APPEND CROSS_OPTIONS -DLLVM_HOST_TRIPLE=arm64-apple-darwin20.3.0) - list(APPEND CROSS_OPTIONS -DLLVM_DEFAULT_TARGET_TRIPLE=arm64-apple-darwin20.3.0) - elseif(VCPKG_TARGET_IS_WINDOWS) - list(APPEND CROSS_OPTIONS -DLLVM_HOST_TRIPLE=arm64-pc-win32) - list(APPEND CROSS_OPTIONS -DLLVM_DEFAULT_TARGET_TRIPLE=arm64-pc-win32) - - # Remove if PR #16111 is merged - list(APPEND CROSS_OPTIONS -DCMAKE_CROSSCOMPILING=ON) - list(APPEND CROSS_OPTIONS -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64) - list(APPEND CROSS_OPTIONS -DCMAKE_SYSTEM_NAME:STRING=Windows) - endif() - list(APPEND CROSS_OPTIONS -DLLVM_TARGET_ARCH=AArch64) - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - if(VCPKG_TARGET_IS_OSX) - list(APPEND CROSS_OPTIONS -DLLVM_HOST_TRIPLE=x86_64-apple-darwin20.3.0) - list(APPEND CROSS_OPTIONS -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin20.3.0) - endif() - list(APPEND CROSS_OPTIONS -DLLVM_TARGET_ARCH=X86) - endif() -endif() - vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH}/llvm OPTIONS ${FEATURE_OPTIONS} - ${CROSS_OPTIONS} -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF diff --git a/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json b/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json index 3a7b55cff4778b..eb563a5114da76 100644 --- a/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-llvm/vcpkg.json @@ -22,6 +22,7 @@ "enable-zlib", "lld", "lldb", + "openmp", "polly", "target-aarch64", "target-amdgpu", From 5494fd2b19be93e91405c482969c500897b50169 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 2 May 2022 18:23:16 +0300 Subject: [PATCH 19/23] update version --- versions/l-/llvm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 743f4d675b31c7..70e824a449664f 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cf39577c60b00f85d104832344349d51a2551c9f", + "git-tree": "8e2d3b85335f90ac289554e727c75f73767ecc3e", "version": "14.0.3", "port-version": 0 }, From e222cd6b64a2dbff75bcba4301936ea73dbe266e Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Tue, 10 May 2022 07:36:04 +0300 Subject: [PATCH 20/23] [llvm] use vcpkg_cmake_get_vars --- ports/llvm/portfile.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index e400aab9d50a93..51847db2638c76 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -34,6 +34,9 @@ vcpkg_check_features( enable-bindings LLVM_ENABLE_BINDINGS ) +vcpkg_cmake_get_vars(cmake_vars_file) +include("${cmake_vars_file}") + # LLVM generates CMake error due to Visual Studio version 16.4 is known to miscompile part of LLVM. # LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON disables this error. # See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html @@ -117,7 +120,7 @@ if("compiler-rt" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "compiler-rt") endif() if("flang" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") message(FATAL_ERROR "Building Flang with MSVC is not supported on x86. Disable it until issues are fixed.") endif() list(APPEND LLVM_ENABLE_PROJECTS "flang") @@ -152,7 +155,7 @@ if("polly" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "polly") endif() if("pstl" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") message(FATAL_ERROR "Building pstl with MSVC is not supported. Disable it until issues are fixed.") endif() list(APPEND LLVM_ENABLE_PROJECTS "pstl") @@ -160,13 +163,13 @@ endif() set(LLVM_ENABLE_RUNTIMES) if("libcxx" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") message(FATAL_ERROR "Building libcxx with MSVC is not supported, as cl doesn't support the #include_next extension.") endif() list(APPEND LLVM_ENABLE_RUNTIMES "libcxx") endif() if("libcxxabi" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") message(FATAL_ERROR "Building libcxxabi with MSVC is not supported. Disable it until issues are fixed.") endif() list(APPEND LLVM_ENABLE_RUNTIMES "libcxxabi") From 27a6e9d8830139cfeeda26d97c7dd7614e63ffdb Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Tue, 10 May 2022 07:37:30 +0300 Subject: [PATCH 21/23] [llvm/openmp] install CMake file in share/openmp --- ports/llvm/0002-fix-install-paths.patch | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ports/llvm/0002-fix-install-paths.patch b/ports/llvm/0002-fix-install-paths.patch index cdf5b2c799ac0c..c5a2885f429629 100644 --- a/ports/llvm/0002-fix-install-paths.patch +++ b/ports/llvm/0002-fix-install-paths.patch @@ -6,8 +6,9 @@ llvm/cmake/modules/CMakeLists.txt | 2 +- mlir/cmake/modules/CMakeLists.txt | 4 ++-- mlir/test/CMakeLists.txt | 2 +- + openmp/tools/Modules/CMakeLists.txt | 2 +- polly/cmake/CMakeLists.txt | 4 ++-- - 9 files changed, 14 insertions(+), 14 deletions(-) + 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt index c6f6ce9fe5d6..fc886b23a1a8 100644 @@ -133,6 +134,16 @@ index 8e44a9c37cf1..f6edc7d77ffd 100644 # Passed to lit.site.cfg.py.in to set up the path where to find the libraries # for linalg integration tests. +diff --git a/openmp/tools/Modules/CMakeLists.txt b/openmp/tools/Modules/CMakeLists.txt +index 22d818eea72d..75aacc4468d4 100644 +--- a/openmp/tools/Modules/CMakeLists.txt ++++ b/openmp/tools/Modules/CMakeLists.txt +@@ -12,4 +12,4 @@ + + + install(FILES "FindOpenMPTarget.cmake" +- DESTINATION "${OPENMP_INSTALL_LIBDIR}/cmake/openmp") ++ DESTINATION "share/openmp") diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt index 7a0190b69df6..cdd3b4f126bb 100644 --- a/polly/cmake/CMakeLists.txt From 949de8a8dfba0a95a6a303cd5461e7d5401f652a Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sat, 14 May 2022 11:23:56 +0300 Subject: [PATCH 22/23] [llvm] add vcpkg-cmake-get-vars dependency and slip post build check if OpenMP is enabled --- ports/llvm/portfile.cmake | 2 ++ ports/llvm/vcpkg.json | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 51847db2638c76..0896fa6ba332c3 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -150,6 +150,8 @@ if("openmp" IN_LIST FEATURES) vcpkg_find_acquire_program(PERL) get_filename_component(PERL_PATH ${PERL} DIRECTORY) vcpkg_add_to_path(${PERL_PATH}) + # Skip post-build check + set(VCPKG_POLICY_SKIP_DUMPBIN_CHECKS enabled) endif() if("polly" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "polly") diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 094be0231ead9e..383aad641ffe79 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -13,6 +13,10 @@ { "name": "vcpkg-cmake-config", "host": true + }, + { + "name": "vcpkg-cmake-get-vars", + "host": true } ], "default-features": [ From 5e5847c68fe01deeb19d68fca4b4f7f7ca4260e7 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Sat, 14 May 2022 11:26:32 +0300 Subject: [PATCH 23/23] update version --- versions/l-/llvm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 70e824a449664f..a2af523ae03617 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "8e2d3b85335f90ac289554e727c75f73767ecc3e", + "git-tree": "751084451d4807176af868b2edab17131c2e4a09", "version": "14.0.3", "port-version": 0 },