blob: f7d5eaaf9ea1f3357dec1ba50bc8532654c83560 [file] [log] [blame]
Greg Hartman8527e472015-11-02 13:08:12 -08001#
2# Copyright 2015 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
Nicolas Capens352e56c2017-08-10 16:57:25 -040017LOCAL_PATH := $(call my-dir)
Merck Hung90c0c552018-09-28 16:08:14 +080018swiftshader_root := $(LOCAL_PATH)
Greg Hartman8527e472015-11-02 13:08:12 -080019
Ben Claytond632e6d2019-04-12 16:51:47 -040020# LLVM version for SwiftShader's JIT compiler (Reactor).
21REACTOR_LLVM_VERSION := 7
Logan Chien17b75892018-08-27 10:49:24 +080022
Nicolas Capensfde88d92018-10-15 12:55:02 -040023# Subzero is an alternative JIT compiler. It is smaller and generally slower.
24REACTOR_USE_SUBZERO := false
Logan Chien17b75892018-08-27 10:49:24 +080025
Ben Claytond632e6d2019-04-12 16:51:47 -040026# SwiftShader requires C++11.
Nicolas Capensfde88d92018-10-15 12:55:02 -040027# Full C++11 support is only available from Marshmallow and up.
Nicolas Capens352e56c2017-08-10 16:57:25 -040028ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23 && echo PreMarshmallow),PreMarshmallow)
Ben Claytond632e6d2019-04-12 16:51:47 -040029swiftshader_unsupported_build := true
Nicolas Capens352e56c2017-08-10 16:57:25 -040030endif
Logan Chien17b75892018-08-27 10:49:24 +080031
32# Check whether $(TARGET_ARCH) is supported.
Logan Chien17b75892018-08-27 10:49:24 +080033ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 arm arm64))
Logan Chien6aad6a72018-09-25 17:59:20 +080034swiftshader_unsupported_build := true
Logan Chien17b75892018-08-27 10:49:24 +080035endif
Logan Chien17b75892018-08-27 10:49:24 +080036
Merck Hung90c0c552018-09-28 16:08:14 +080037ifneq ($(swiftshader_unsupported_build),true)
38include $(swiftshader_root)/src/Android.mk
Alexis Hetud16a5042018-10-17 10:10:23 -040039include $(swiftshader_root)/tests/GLESUnitTests/Android.mk
Merck Hung90c0c552018-09-28 16:08:14 +080040include $(swiftshader_root)/third_party/llvm-7.0/Android.mk
41endif