• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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// Executable llvm-spirv
19//=====================================================================
20
21cc_binary {
22    name: "llvm-spirv",
23    host_supported: true,
24
25    srcs: ["llvm-spirv.cpp"],
26
27    target: {
28        linux: {
29            host_ldlibs: [
30                "-lrt",
31                "-ldl",
32                "-lpthread",
33            ],
34        },
35        darwin: {
36            host_ldlibs: [
37                "-ldl",
38                "-lpthread",
39            ],
40        },
41        android: {
42            cflags: [
43                "-DNDEBUG=1",
44            ],
45        },
46        host: {
47            cflags: [
48                "-fno-rtti",
49                "-fno-exceptions",
50            ],
51        },
52    },
53
54    shared_libs: [
55        "libLLVM",
56        "libSPIRV",
57    ],
58
59    header_libs: ["llvm-headers"],
60
61    cflags: [
62        "-D_SPIRV_LLVM_API",
63        "-D__STDC_LIMIT_MACROS",
64        "-D__STDC_CONSTANT_MACROS",
65        "-Wall",
66        "-Werror",
67        "-Wno-unused-parameter",
68    ],
69
70    product_variables: {
71        unbundled_build: {
72            // Don't build for unbundled branches
73            enabled: false,
74        },
75    },
76}
77