Fix P4 linux make builds
Change-Id: I6cc4e69a914389b53bc3b52535eb6faf24897a09
Этот коммит содержится в:
@@ -105,9 +105,9 @@ char* demangle(const char* loweredName) {
|
||||
if (!loweredName) {
|
||||
return nullptr;
|
||||
}
|
||||
#if HIPRTC_USE_CXXABI || __linux__
|
||||
#if __linux__
|
||||
int status = 0;
|
||||
char* demangledName = abi::__cxa_demangle(loweredName, nullptr, nullptr, &status);
|
||||
char* demangledName = DEMANGLE(loweredName, nullptr, nullptr, &status);
|
||||
if (status != 0) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ char* demangle(const char* loweredName) {
|
||||
}
|
||||
#else
|
||||
#error "Only Linux and Windows are supported"
|
||||
#endif // HIPRTC_USE_CXXABI || __linux__
|
||||
#endif // __linux__
|
||||
return demangledName;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,17 +23,28 @@
|
||||
|
||||
#include "hip_internal.hpp"
|
||||
|
||||
#if HIPRTC_USE_CXXABI || __linux__
|
||||
#include <cxxabi.h>
|
||||
#if __linux__
|
||||
#include <cstdlib>
|
||||
|
||||
#if HIPRTC_USE_CXXABI
|
||||
#include <cxxabi.h>
|
||||
|
||||
#define DEMANGLE abi::__cxa_demangle
|
||||
|
||||
#else
|
||||
extern "C" char * __cxa_demangle(const char *mangled_name, char *output_buffer,
|
||||
size_t *length, int *status);
|
||||
|
||||
#define DEMANGLE __cxa_demangle
|
||||
#endif //HIPRTC_USE_CXXABI
|
||||
|
||||
#elif defined(_WIN32)
|
||||
#include <Windows.h>
|
||||
#include <DbgHelp.h>
|
||||
|
||||
#define UNDECORATED_SIZE 4096
|
||||
|
||||
#endif // HIPRTC_USE_CXXABI || __linux__
|
||||
#endif // __linux__
|
||||
|
||||
// This macro should be called at the beginning of every HIP RTC API.
|
||||
#define HIPRTC_INIT_API(...) \
|
||||
|
||||
Ссылка в новой задаче
Block a user