blob: 248a1c64b9de5d781355ff364eeebad5c38ccf9e [file] [log] [blame]
Alistair Strachan60f86622018-03-22 17:37:55 -07001//
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
17cc_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 Liatis04c0eac2019-04-29 17:03:34 -070032 "-DVK_USE_PLATFORM_ANDROID_KHR",
Nicolas Capensa4347a92020-03-01 08:29:25 -050033 "-DVK_EXPORT= ",
Alistair Strachan60f86622018-03-22 17:37:55 -070034 ],
Ben Clayton3cc0aea2020-01-08 19:09:25 +000035 cpp_std: "c++14",
Alistair Strachan60f86622018-03-22 17:37:55 -070036
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
53cc_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
66cc_defaults {
67 name: "swiftshader_common_debug",
68
69 defaults: [ "swiftshader_common" ],
70
71 cflags: [
72 "-O0",
73 "-g",
74 "-UNDEBUG",
75 ],
76}
77
Alistair Strachan60f86622018-03-22 17:37:55 -070078cc_library_headers {
79 name: "swiftshader_platform_headers",
80 host_supported: true,
Chris Forbes0deebed2019-04-05 10:07:33 -070081 device_supported: true,
82 vendor_available: true,
Alistair Strachan60f86622018-03-22 17:37:55 -070083 export_include_dirs: ["include"],
84}
85
86cc_library_headers {
87 name: "swiftshader_host_headers",
88 device_supported: false,
89 host_supported: true,
90 export_include_dirs: ["include/Android"],
91}