SWDEV-430963 - Address MIGraphX failures due to unsafe buffer access usage
Compiler seem to be stricter in compiler staging builds related to safe buffer programming when compared to other component staging builds. This seem to result in additional errors when -Werror is enabled in MIGraphX tests. Removes all the clang pragmas to ignore several type of warnings in all the headers and adds a single pragma which ignores all warnings using #pragma clang diagnostic ignored "-Weverything" in hiprtc builtins. Change-Id: I95f302bb285b2451b19dd5dfdb7df29164b0f750
Tento commit je obsažen v:
@@ -86,11 +86,16 @@ endfunction(get_hiprtc_macros)
|
||||
|
||||
# To allow concatenating above macros during build time, call this file in script mode.
|
||||
if(HIPRTC_ADD_MACROS)
|
||||
# Read the existing content of the preprocessed file into a temporary variable
|
||||
FILE(READ "${HIPRTC_PREPROCESSED_FILE}" ORIGINAL_PREPROCESSED_FILE)
|
||||
# Prepend the pragma to the original content
|
||||
set(MODIFIED_PREPROCESSED_FILE "#pragma clang diagnostic ignored \"-Weverything\"
|
||||
\n${ORIGINAL_PREPROCESSED_FILE}")
|
||||
# Write the modified preprocessed content back to the original file
|
||||
FILE(WRITE ${HIPRTC_PREPROCESSED_FILE} "${MODIFIED_PREPROCESSED_FILE}")
|
||||
message(STATUS "Appending hiprtc macros to ${HIPRTC_PREPROCESSED_FILE}.")
|
||||
get_hiprtc_macros(HIPRTC_DEFINES)
|
||||
FILE(APPEND ${HIPRTC_PREPROCESSED_FILE} "${HIPRTC_DEFINES}")
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
||||
set(HIPRTC_HEADER_LIST ${HIPRTC_HEADERS})
|
||||
separate_arguments(HIPRTC_HEADER_LIST)
|
||||
# appends all the headers from the list to the hiprtc preprocessed file
|
||||
@@ -98,7 +103,6 @@ if(HIPRTC_ADD_MACROS)
|
||||
FILE(READ "${header}" HEADER_FILE)
|
||||
FILE(APPEND ${HIPRTC_PREPROCESSED_FILE} "${HEADER_FILE}")
|
||||
endforeach()
|
||||
#pragma clang diagnostic pop
|
||||
endif()
|
||||
|
||||
macro(generate_hiprtc_header HiprtcHeader)
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele