Added dummy android test application

The application is needed to test Android.mk build.
This commit is contained in:
Andrey Tuganov 2017-10-20 14:34:32 -04:00 committed by David Neto
parent d819f513f6
commit cfb711a68b
3 changed files with 33 additions and 0 deletions

View File

@ -1,2 +1,12 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CPP_EXTENSION := .cc .cpp .cxx
LOCAL_SRC_FILES:=test.cpp
LOCAL_MODULE:=spirvtools_test
LOCAL_LDLIBS:=-landroid
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror
LOCAL_STATIC_LIBRARIES=SPIRV-Tools SPIRV-Tools-opt
include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH)/../Android.mk

View File

@ -2,3 +2,4 @@ APP_ABI := all
APP_BUILD_SCRIPT := Android.mk
APP_STL := gnustl_static
APP_PLATFORM := android-9
NDK_TOOLCHAIN_VERSION := 4.9

22
android_test/test.cpp Normal file
View File

@ -0,0 +1,22 @@
// Copyright (c) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <memory>
#include "spirv-tools/libspirv.hpp"
#include "spirv-tools/optimizer.hpp"
void android_main(struct android_app* /*state*/) {
spvtools::SpirvTools tools(SPV_ENV_UNIVERSAL_1_2);
spvtools::Optimizer optimizer(SPV_ENV_UNIVERSAL_1_2);
}