From f8491794d3ee6beb4a6a98bfe95dcbb08dcef87e Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 25 Jun 2026 16:53:59 -0700 Subject: [PATCH] thunks/cuda: Convert constexpr to const Apparently some compilers or libstdc++ or libc++ takes offence to constexpr std::array that gets filled by GOT. My compiler this generates the same code regardless but I guess this'll probably fix #5582. --- ThunkLibs/libcuda/libcuda_Guest.cpp | 2 +- ThunkLibs/libcuda/libcuda_Host.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ThunkLibs/libcuda/libcuda_Guest.cpp b/ThunkLibs/libcuda/libcuda_Guest.cpp index beac01ed9..659a6a080 100644 --- a/ThunkLibs/libcuda/libcuda_Guest.cpp +++ b/ThunkLibs/libcuda/libcuda_Guest.cpp @@ -56,7 +56,7 @@ struct override_entry { void* ptr; }; -constexpr static std::array proc_override = { +const static std::array proc_override = { {{"cuGetProcAddress", (void*)cuGetProcAddress_v2}, {"cuGetProcAddress_v2", (void*)cuGetProcAddress_v2}}}; CUresult cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) { diff --git a/ThunkLibs/libcuda/libcuda_Host.cpp b/ThunkLibs/libcuda/libcuda_Host.cpp index 2ba10f675..da533ae25 100644 --- a/ThunkLibs/libcuda/libcuda_Host.cpp +++ b/ThunkLibs/libcuda/libcuda_Host.cpp @@ -17,7 +17,7 @@ struct override_entry { void* ptr; }; -constexpr static std::array proc_override = { +const static std::array proc_override = { {{"cuCtxCreate_v2", (void*)FEXFN_IMPL(cuCtxCreate_v2)}, {"cuGetExportTable", (void*)FEXFN_IMPL(cuGetExportTable)}}}; static CUresult FEXFN_IMPL(cuGetProcAddress_v2)(const char* symbol, guest_layout pfn, int cudaVersion, cuuint64_t flags,