Skip to content

Conversation

@Niram7777
Copy link
Contributor

  1. getDeclaration
    [IR] Remove Intrinsic::getDeclaration llvm/llvm-project#152645

  2. getFirstNonPHI
    [NFC][DebugInfo] Deprecate iterator-taking moveBefore and getFirstNonPHI llvm/llvm-project#124290

  3. use pointers intead of LLVM iterator because some of them API dont support their iterator

  4. Fix an issue I had for quite some time:

FAILED: [code=1] rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/RSX/VK/vkutils/memory.cpp.o 
/home/marin/install/bin/clang++ -DDATADIR=\"/home/marin/install/share/rpcs3\" -DECC_SHAMIR -DFP_MAX_BITS=8192 -DGAMEMODE_AVAILABLE -DGCM_TABLE_4BIT -DHAVE_AESGCM -DHAVE_CHACHA -DHAVE_DH_DEFAULT_PARAMS -DHAVE_ECC -DHAVE_ENCRYPT_THEN_MAC -DHAVE_EXTENDED_MASTER -DHAVE_FFDHE_2048 -DHAVE_HASHDRBG -DHAVE_LIBEVDEV -DHAVE_ONE_TIME_AUTH -DHAVE_POLY1305 -DHAVE_PTHREAD -DHAVE_SNI -DHAVE_SUPPORTED_CURVES -DHAVE_THREAD_LS -DHAVE_TLS_EXTENSIONS -DHAVE_VULKAN -DHAVE_WAYLAND -DHAVE_WRITE_DUP -DHAVE_X11 -DHAVE___UINT128_T -DLLVM_AVAILABLE -DMINIUPNP_STATICLIB -DNO_DES3_TLS_SUITES -DNO_DSA -DNO_MD4 -DNO_PSK -DNO_RC4 -DOPENSSL_EXTRA -DSOUNDTOUCH_ALLOW_SSE -DSOUNDTOUCH_FLOAT_SAMPLES -DST_NO_EXCEPTION_HANDLING -DTFM_ECC256 -DUSE_FAST_MATH -DUSE_MULTICH_ALWAYS -DWC_NO_ASYNC_THREADING -DWC_NO_HARDEN -DWOLFSSL_ALT_CERT_CHAINS -DWOLFSSL_DES_ECB -DWOLFSSL_ENCRYPTED_KEYS -DWOLFSSL_NO_OPTIONS_H -DWOLFSSL_NO_SHAKE128 -DWOLFSSL_SHA224 -DWOLFSSL_SHA3 -DWOLFSSL_SHA384 -DWOLFSSL_SHA512 -DWOLFSSL_SHAKE256 -DWOLFSSL_SYS_CA_CERTS -DWOLFSSL_USE_ALIGN -DWOLFSSL_X86_64_BUILD -DYAML_CPP_STATIC_DEFINE -DZLIB_CONST=1 -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/mnt/data/git/rpcs3/rpcs3/Emu/../.. -I/mnt/data/git/rpcs3/rpcs3/Emu/.. -I/mnt/data/git/rpcs3/rpcs3/Emu/../../3rdparty -I/mnt/data/git/rpcs3 -I/home/marin/install/include -I/mnt/data/git/rpcs3/3rdparty/asmjit/asmjit/src -I/mnt/data/git/rpcs3/3rdparty/stblib/stb -I/mnt/data/git/rpcs3/3rdparty/libusb/libusb/libusb -I/mnt/data/git/rpcs3/3rdparty/wolfssl/wolfssl -I/mnt/data/build/release/rpcs3/3rdparty/wolfssl/wolfssl -I/mnt/data/git/rpcs3/3rdparty/cubeb/cubeb/include -I/mnt/data/build/release/rpcs3/exports -I/mnt/data/git/rpcs3/3rdparty/SoundTouch/soundtouch/include -I/mnt/data/git/rpcs3/3rdparty/miniupnp/libminiupnpc-static -I/mnt/data/git/rpcs3/3rdparty/miniupnp/miniupnp/miniupnpc/include -I/mnt/data/git/rpcs3/3rdparty/pugixml/src -I/mnt/data/git/rpcs3/3rdparty/glslang/glslang/SPIRV/.. -I/mnt/data/git/rpcs3/3rdparty/glslang/glslang/glslang/.. -I/mnt/data/build/release/rpcs3/include -I/mnt/data/git/rpcs3/3rdparty/libpng/libpng -I/mnt/data/build/release/rpcs3/3rdparty/libpng/libpng -I/mnt/data/git/rpcs3/3rdparty/rtmidi/rtmidi -I/mnt/data/git/rpcs3/3rdparty/yaml-cpp/yaml-cpp/include -I/mnt/data/git/rpcs3/3rdparty/zstd/zstd/build/cmake/../../lib -isystem /mnt/data/git/rpcs3/3rdparty/zlib/zlib -isystem /mnt/data/build/release/rpcs3/3rdparty/zlib/zlib -isystem /mnt/data/git/rpcs3/3rdparty/ffmpeg/include -isystem /mnt/data/git/rpcs3/3rdparty/GL -isystem /usr/include/AL -isystem /usr/include/libevdev-1.0 -isystem /mnt/data/git/rpcs3/3rdparty/flatbuffers/include -isystem /mnt/data/git/rpcs3/3rdparty/GPUOpen/VulkanMemoryAllocator/include -fdiagnostics-color=always -O3 -DNDEBUG -std=gnu++20 -flto=thin -fPIC -fcolor-diagnostics -pthread -Wall -fno-exceptions -fstack-protector -march=native -Werror=old-style-cast -Werror=sign-compare -Werror=reorder -Werror=return-type -Werror=overloaded-virtual -Werror=missing-noreturn -Werror=implicit-fallthrough -Wunused-parameter -Wignored-qualifiers -Wredundant-move -Wcast-qual -Wdeprecated-copy -Wtautological-compare -Wempty-body -Wredundant-decls -Wstrict-aliasing=1 -Werror=inconsistent-missing-override -Werror=delete-non-virtual-dtor -fconstexpr-steps=16777216 -Wno-unused-lambda-capture -Wno-unused-private-field -Wno-unused-command-line-argument -Wno-elaborated-enum-base -Winvalid-pch -Xclang -include-pch -Xclang /mnt/data/build/release/rpcs3/rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /mnt/data/build/release/rpcs3/rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/cmake_pch.hxx -MD -MT rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/RSX/VK/vkutils/memory.cpp.o -MF rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/RSX/VK/vkutils/memory.cpp.o.d @rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/RSX/VK/vkutils/memory.cpp.o.modmap -o rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/RSX/VK/vkutils/memory.cpp.o -c /mnt/data/git/rpcs3/rpcs3/Emu/RSX/VK/vkutils/memory.cpp
/mnt/data/git/rpcs3/rpcs3/Emu/RSX/VK/vkutils/memory.cpp:180:36: error: use of old-style cast [-Werror,-Wold-style-cast]
  180 |                 allocatorInfo.vulkanApiVersion = VK_API_VERSION_1_2;
      |                                                  ^~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:6136:28: note: expanded from macro 'VK_API_VERSION_1_2'                                                                                                                                                                                                                      
 6136 | #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:63:8: note: expanded from macro 'VK_MAKE_API_VERSION'                                                                                                                                                                                                                        
   63 |     ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
      |        ^         ~~~~~~~~~
/mnt/data/git/rpcs3/rpcs3/Emu/RSX/VK/vkutils/memory.cpp:180:36: error: use of old-style cast [-Werror,-Wold-style-cast]                                                                                                                                                                                                       
  180 |                 allocatorInfo.vulkanApiVersion = VK_API_VERSION_1_2;
      |                                                  ^~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:6136:28: note: expanded from macro 'VK_API_VERSION_1_2'                                                                                                                                                                                                                      
 6136 | #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:63:41: note: expanded from macro 'VK_MAKE_API_VERSION'                                                                                                                                                                                                                       
   63 |     ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
      |                                         ^         ~~~~~~~
/mnt/data/git/rpcs3/rpcs3/Emu/RSX/VK/vkutils/memory.cpp:180:36: error: use of old-style cast [-Werror,-Wold-style-cast]                                                                                                                                                                                                       
  180 |                 allocatorInfo.vulkanApiVersion = VK_API_VERSION_1_2;
      |                                                  ^~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:6136:28: note: expanded from macro 'VK_API_VERSION_1_2'                                                                                                                                                                                                                      
 6136 | #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:63:72: note: expanded from macro 'VK_MAKE_API_VERSION'                                                                                                                                                                                                                       
   63 |     ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
      |                                                                        ^         ~~~~~~~
/mnt/data/git/rpcs3/rpcs3/Emu/RSX/VK/vkutils/memory.cpp:180:36: error: use of old-style cast [-Werror,-Wold-style-cast]                                                                                                                                                                                                       
  180 |                 allocatorInfo.vulkanApiVersion = VK_API_VERSION_1_2;
      |                                                  ^~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:6136:28: note: expanded from macro 'VK_API_VERSION_1_2'                                                                                                                                                                                                                      
 6136 | #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marin/install/include/vulkan/vulkan_core.h:63:102: note: expanded from macro 'VK_MAKE_API_VERSION'                                                                                                                                                                                                                      
   63 |     ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
      |                                                                                                      ^         ~~~~~~~
4 errors generated. 

by configuring 3rdparties as system, I may have missed others.

LLVM used llvm/llvm-project@8462cff

@Niram7777 Niram7777 marked this pull request as draft November 30, 2025 15:34
@Niram7777
Copy link
Contributor Author

LLVM needs to be updated on the CI

@AniLeo
Copy link
Member

AniLeo commented Nov 30, 2025

We're still on LLVM 19, feel free to use ifdef guards with LLVM version to get this merged

@qurious-pixel
Copy link
Contributor

qurious-pixel commented Dec 1, 2025

@Niram7777 were you able to test this with LLVM22? FreeBSD, Windows Clang and Mac builds are all using Clang 21. I can test the Linux and Windows MSVC builds.

Windows MSVC builds fine. Tested LLVM22 1c32b6f.

@Niram7777 Niram7777 marked this pull request as ready for review December 3, 2025 06:17
)

target_include_directories(soundtouch PRIVATE
target_include_directories(soundtouch SYSTEM PRIVATE
Copy link
Contributor Author

@Niram7777 Niram7777 Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why this extra parameter is needed is because we are not using imported targets so the compilation warnings from 3rd parties are propagated.
https://cmake.org/cmake/help/latest/prop_tgt/SYSTEM.html

The PR is ready for merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants