Fix extra warnings in Android build
This commit is contained in:
parent
74d4321172
commit
802bbe87ad
4 changed files with 17 additions and 9 deletions
|
@ -57,7 +57,7 @@ matrix:
|
||||||
|
|
||||||
- name: Android export template (release_debug, Clang)
|
- name: Android export template (release_debug, Clang)
|
||||||
stage: build
|
stage: build
|
||||||
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
|
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
addons:
|
addons:
|
||||||
|
|
|
@ -14,6 +14,14 @@ if env["platform"] == "android":
|
||||||
thirdparty_dir + "/layers/generated",
|
thirdparty_dir + "/layers/generated",
|
||||||
]
|
]
|
||||||
env.Prepend(CPPPATH=thirdparty_includes)
|
env.Prepend(CPPPATH=thirdparty_includes)
|
||||||
|
|
||||||
|
# Build Vulkan memory allocator
|
||||||
|
env_thirdparty = env.Clone()
|
||||||
|
env_thirdparty.disable_warnings()
|
||||||
|
|
||||||
|
thirdparty_dir = "#thirdparty/vulkan"
|
||||||
|
vma_sources = [thirdparty_dir + "/android/vk_mem_alloc.cpp"]
|
||||||
|
env_thirdparty.add_source_files(env.drivers_sources, vma_sources)
|
||||||
elif env["builtin_vulkan"]:
|
elif env["builtin_vulkan"]:
|
||||||
# Use bundled Vulkan headers
|
# Use bundled Vulkan headers
|
||||||
thirdparty_dir = "#thirdparty/vulkan"
|
thirdparty_dir = "#thirdparty/vulkan"
|
||||||
|
|
|
@ -31,14 +31,6 @@
|
||||||
#include "vulkan_context_android.h"
|
#include "vulkan_context_android.h"
|
||||||
#include <vulkan/vulkan_android.h>
|
#include <vulkan/vulkan_android.h>
|
||||||
|
|
||||||
#define VMA_IMPLEMENTATION
|
|
||||||
#ifdef DEBUG_ENABLED
|
|
||||||
#ifndef _DEBUG
|
|
||||||
#define _DEBUG
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#include <vk_mem_alloc.h>
|
|
||||||
|
|
||||||
const char *VulkanContextAndroid::_get_platform_surface_extension() const {
|
const char *VulkanContextAndroid::_get_platform_surface_extension() const {
|
||||||
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
|
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
|
||||||
}
|
}
|
||||||
|
|
8
thirdparty/vulkan/android/vk_mem_alloc.cpp
vendored
Normal file
8
thirdparty/vulkan/android/vk_mem_alloc.cpp
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#define VMA_IMPLEMENTATION
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
|
#ifndef _DEBUG
|
||||||
|
#define _DEBUG
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
// Include memory allocator from Android NDK
|
||||||
|
#include <vk_mem_alloc.h>
|
Loading…
Reference in a new issue