Suppress warnings in Subzero dependencies
https://swiftshader-review.googlesource.com/c/SwiftShader/+/40788 and
https://swiftshader-review.googlesource.com/c/SwiftShader/+/41968 cause
us to use different compile flags for Subzero's LLVM dependencies than
the rest of SwiftShader. Suppress the warnings that this has unleashed.
Bug: b/132445520
Change-Id: I1f20e32b487035e953c02cd4829460c072e38ac3
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41969
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7deb25f..8d6b86e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1664,6 +1664,13 @@
"/wd4334" # ''operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
"/wd4996" # The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: new_name.
)
+ list(APPEND SUBZERO_DEPENDENCIES_COMPILE_OPTIONS
+ ${SUBZERO_COMPILE_OPTIONS}
+ "/wd4267" # '=': conversion from 'size_t' to 'sopno', possible loss of data
+ "/wd4244" # '=': conversion from '__int64' to 'llvm_regoff_t', possible loss of data
+ "/wd4141" # 'inline': used more than once
+ "/wd4291" # 'void *operator new(size_t,const `anonymous-namespace'::NamedBufferAlloc &)': no matching operator delete found; memory will not be freed if initialization throws an exception
+ )
endif()
add_library(SubzeroDependencies STATIC
@@ -1672,7 +1679,7 @@
set_target_properties(SubzeroDependencies PROPERTIES
POSITION_INDEPENDENT_CODE 1
INCLUDE_DIRECTORIES "${SUBZERO_INCLUDE_DIR}"
- COMPILE_OPTIONS "${SUBZERO_COMPILE_OPTIONS}"
+ COMPILE_OPTIONS "${SUBZERO_DEPENDENCIES_COMPILE_OPTIONS}"
FOLDER "Subzero"
)