Home | History | Annotate | Download | only in SPIRV
      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 //=====================================================================
     19 // Shared Library libSPIRV
     20 //=====================================================================
     21 
     22 cc_library_shared {
     23     name: "libSPIRV",
     24     host_supported: true,
     25 
     26     srcs: [
     27         "libSPIRV/SPIRVBasicBlock.cpp",
     28         "libSPIRV/SPIRVDebug.cpp",
     29         "libSPIRV/SPIRVDecorate.cpp",
     30         "libSPIRV/SPIRVEntry.cpp",
     31         "libSPIRV/SPIRVFunction.cpp",
     32         "libSPIRV/SPIRVInstruction.cpp",
     33         "libSPIRV/SPIRVModule.cpp",
     34         "libSPIRV/SPIRVStream.cpp",
     35         "libSPIRV/SPIRVType.cpp",
     36         "libSPIRV/SPIRVValue.cpp",
     37         "Mangler/FunctionDescriptor.cpp",
     38         "Mangler/Mangler.cpp",
     39         "Mangler/ManglingUtils.cpp",
     40         "Mangler/ParameterType.cpp",
     41         "OCL20To12.cpp",
     42         "OCL20ToSPIRV.cpp",
     43         "OCL21ToSPIRV.cpp",
     44         "OCLTypeToSPIRV.cpp",
     45         "OCLUtil.cpp",
     46         "SPIRVLowerBool.cpp",
     47         "SPIRVLowerConstExpr.cpp",
     48         "SPIRVLowerOCLBlocks.cpp",
     49         "SPIRVReader.cpp",
     50         "SPIRVRegularizeLLVM.cpp",
     51         "SPIRVToOCL20.cpp",
     52         "SPIRVUtil.cpp",
     53         "SPIRVWriter.cpp",
     54         "SPIRVWriterPass.cpp",
     55         "TransOCLMD.cpp",
     56     ],
     57 
     58     export_include_dirs: [
     59         ".",
     60         "libSPIRV",
     61         "Mangler",
     62     ],
     63 
     64     header_libs: ["llvm-headers"],
     65 
     66     compile_multilib: "first",
     67 
     68     target: {
     69         android: {
     70             cflags: ["-Wno-error=non-virtual-dtor"],
     71         },
     72         host: {
     73             cflags: [
     74                 "-fno-rtti",
     75                 "-fno-exceptions",
     76             ],
     77         },
     78     },
     79 
     80     shared_libs: ["libLLVM_android"],
     81 
     82     cflags: [
     83         "-D_SPIRV_LLVM_API",
     84         "-D__STDC_LIMIT_MACROS",
     85         "-D__STDC_CONSTANT_MACROS",
     86         "-Wall",
     87         "-Werror",
     88         "-Wno-unused-parameter",
     89     ],
     90 
     91     clang_cflags: [
     92         // Temporarily suppress the warnings http://b/37867503
     93         "-Wno-error=user-defined-warnings",
     94     ],
     95 
     96     product_variables: {
     97         unbundled_build: {
     98             // Don't build for unbundled branches
     99             enabled: false,
    100         },
    101     },
    102 }
    103