Alistair Strachan | 60f8662 | 2018-03-22 17:37:55 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 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 | |
| 17 | cc_defaults { |
| 18 | name: "swiftshader_common", |
| 19 | |
| 20 | gnu_extensions: false, |
| 21 | |
| 22 | cflags: [ |
| 23 | "-Xclang", "-fuse-init-array", |
| 24 | "-fno-operator-names", |
| 25 | "-msse2", |
| 26 | "-Werror", |
| 27 | "-Wwrite-strings", |
| 28 | ], |
| 29 | |
| 30 | cppflags: [ |
| 31 | "-Woverloaded-virtual", |
Hernan Liatis | 04c0eac | 2019-04-29 17:03:34 -0700 | [diff] [blame] | 32 | "-DVK_USE_PLATFORM_ANDROID_KHR", |
Chris Forbes | 4963b95 | 2019-05-29 14:37:57 -0700 | [diff] [blame] | 33 | "-DVK_EXPORT= ", |
Alistair Strachan | 60f8662 | 2018-03-22 17:37:55 -0700 | [diff] [blame] | 34 | ], |
Ben Clayton | 3cc0aea | 2020-01-08 19:09:25 +0000 | [diff] [blame] | 35 | cpp_std: "c++14", |
Alistair Strachan | 60f8662 | 2018-03-22 17:37:55 -0700 | [diff] [blame] | 36 | |
| 37 | target: { |
| 38 | host: { |
| 39 | cppflags: [ |
| 40 | "-fno-rtti", |
| 41 | "-fno-exceptions", |
| 42 | ], |
| 43 | compile_multilib: "64", |
| 44 | }, |
| 45 | |
| 46 | // We don't need Darwin host-side builds |
| 47 | darwin: { |
| 48 | enabled: false, |
| 49 | }, |
| 50 | }, |
| 51 | } |
| 52 | |
| 53 | cc_defaults { |
| 54 | name: "swiftshader_common_release", |
| 55 | |
| 56 | defaults: [ "swiftshader_common" ], |
| 57 | |
| 58 | cflags: [ |
| 59 | "-Os", |
| 60 | "-fomit-frame-pointer", |
| 61 | "-ffunction-sections", |
| 62 | "-fdata-sections", |
| 63 | ], |
| 64 | } |
| 65 | |
| 66 | cc_defaults { |
| 67 | name: "swiftshader_common_debug", |
| 68 | |
| 69 | defaults: [ "swiftshader_common" ], |
| 70 | |
| 71 | cflags: [ |
| 72 | "-O0", |
| 73 | "-g", |
| 74 | "-UNDEBUG", |
| 75 | ], |
| 76 | } |
| 77 | |
Alistair Strachan | 60f8662 | 2018-03-22 17:37:55 -0700 | [diff] [blame] | 78 | cc_library_headers { |
| 79 | name: "swiftshader_platform_headers", |
| 80 | host_supported: true, |
Chris Forbes | 0deebed | 2019-04-05 10:07:33 -0700 | [diff] [blame] | 81 | device_supported: true, |
| 82 | vendor_available: true, |
Alistair Strachan | 60f8662 | 2018-03-22 17:37:55 -0700 | [diff] [blame] | 83 | export_include_dirs: ["include"], |
| 84 | } |
| 85 | |
| 86 | cc_library_headers { |
| 87 | name: "swiftshader_host_headers", |
| 88 | device_supported: false, |
| 89 | host_supported: true, |
| 90 | export_include_dirs: ["include/Android"], |
| 91 | } |