Greg Hartman | 8527e47 | 2015-11-02 13:08:12 -0800 | [diff] [blame] | 1 | # |
| 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 Capens | 352e56c | 2017-08-10 16:57:25 -0400 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
Merck Hung | 90c0c55 | 2018-09-28 16:08:14 +0800 | [diff] [blame] | 18 | swiftshader_root := $(LOCAL_PATH) |
Greg Hartman | 8527e47 | 2015-11-02 13:08:12 -0800 | [diff] [blame] | 19 | |
Nicolas Capens | fde88d9 | 2018-10-15 12:55:02 -0400 | [diff] [blame] | 20 | # Subzero is an alternative JIT compiler. It is smaller and generally slower. |
| 21 | REACTOR_USE_SUBZERO := false |
Logan Chien | 17b7589 | 2018-08-27 10:49:24 +0800 | [diff] [blame] | 22 | |
Ben Clayton | d632e6d | 2019-04-12 16:51:47 -0400 | [diff] [blame] | 23 | # SwiftShader requires C++11. |
Nicolas Capens | fde88d9 | 2018-10-15 12:55:02 -0400 | [diff] [blame] | 24 | # Full C++11 support is only available from Marshmallow and up. |
Nicolas Capens | 352e56c | 2017-08-10 16:57:25 -0400 | [diff] [blame] | 25 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23 && echo PreMarshmallow),PreMarshmallow) |
Ben Clayton | d632e6d | 2019-04-12 16:51:47 -0400 | [diff] [blame] | 26 | swiftshader_unsupported_build := true |
Nicolas Capens | 352e56c | 2017-08-10 16:57:25 -0400 | [diff] [blame] | 27 | endif |
Logan Chien | 17b7589 | 2018-08-27 10:49:24 +0800 | [diff] [blame] | 28 | |
| 29 | # Check whether $(TARGET_ARCH) is supported. |
Logan Chien | 17b7589 | 2018-08-27 10:49:24 +0800 | [diff] [blame] | 30 | ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 arm arm64)) |
Logan Chien | 6aad6a7 | 2018-09-25 17:59:20 +0800 | [diff] [blame] | 31 | swiftshader_unsupported_build := true |
Logan Chien | 17b7589 | 2018-08-27 10:49:24 +0800 | [diff] [blame] | 32 | endif |
Logan Chien | 17b7589 | 2018-08-27 10:49:24 +0800 | [diff] [blame] | 33 | |
Merck Hung | 90c0c55 | 2018-09-28 16:08:14 +0800 | [diff] [blame] | 34 | ifneq ($(swiftshader_unsupported_build),true) |
| 35 | include $(swiftshader_root)/src/Android.mk |
Alexis Hetu | d16a504 | 2018-10-17 10:10:23 -0400 | [diff] [blame] | 36 | include $(swiftshader_root)/tests/GLESUnitTests/Android.mk |
Merck Hung | 90c0c55 | 2018-09-28 16:08:14 +0800 | [diff] [blame] | 37 | include $(swiftshader_root)/third_party/llvm-7.0/Android.mk |
| 38 | endif |