1 // 2 // Copyright (C) 2016 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 //===================================================================== 18 // Unit tests for Wrapper module 19 //===================================================================== 20 21 cc_test_host { 22 name: "Wrapper_test", 23 defaults: [ 24 "llvm-defaults", 25 "spirit_defaults", 26 ], 27 28 srcs: [ 29 "Builtin.cpp", 30 "Context.cpp", 31 "GlobalAllocSPIRITPass.cpp", 32 "RSAllocationUtils.cpp", 33 "Wrapper.cpp", 34 "Wrapper_test.cpp", 35 ], 36 37 shared_libs: [ 38 "libLLVM_android", 39 "libbcinfo", 40 "libspirit", 41 ], 42 } 43 44 //===================================================================== 45 // Unit tests for Builtin module 46 //===================================================================== 47 48 cc_test_host { 49 name: "Builtin_test", 50 defaults: ["spirit_defaults"], 51 52 srcs: [ 53 "Builtin.cpp", 54 "Builtin_test.cpp", 55 ], 56 57 shared_libs: ["libspirit"], 58 } 59 60 //===================================================================== 61 // Host and Device Executable rs2spirv 62 //===================================================================== 63 64 cc_binary { 65 name: "rs2spirv", 66 defaults: [ 67 "llvm-defaults", 68 "spirit_defaults", 69 ], 70 host_supported: true, 71 device_supported: false, 72 73 srcs: [ 74 "rs2spirv.cpp", 75 "Builtin.cpp", 76 "Context.cpp", 77 "GlobalAllocPass.cpp", 78 "GlobalAllocSPIRITPass.cpp", 79 "GlobalMergePass.cpp", 80 "InlinePreparationPass.cpp", 81 "RemoveNonkernelsPass.cpp", 82 "RSAllocationUtils.cpp", 83 "RSSPIRVWriter.cpp", 84 "Wrapper.cpp", 85 ], 86 87 // TODO: fix the remaining warnings 88 cflags: [ 89 "-D_SPIRV_LLVM_API", 90 "-Wno-error=pessimizing-move", 91 "-Wno-error=unused-variable", 92 "-Wno-error=unused-private-field", 93 "-Wno-error=unused-function", 94 "-Wno-error=dangling-else", 95 "-Wno-error=ignored-qualifiers", 96 "-Wno-error=non-virtual-dtor", 97 98 // For debug builds 99 //"-O0", 100 //"-DRS2SPIRV_DEBUG=1", 101 ], 102 103 shared_libs: [ 104 "libLLVM_android", 105 "libbcinfo", 106 "libSPIRV", 107 "libspirit", 108 ], 109 } 110