OSDN Git Service

aa65be2d516db51f55ff20f17a29c451b68792b4
[android-x86/external-swiftshader.git] / src / Reactor / BUILD.gn
1 # Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # Need a separate config to ensure the warnings are added to the end.
16 config("swiftshader_reactor_private_config") {
17   if (is_clang) {
18     cflags = [
19       "-DLOG_TAG=\"swiftshader_reactor\"",
20       "-Wno-unused-local-typedef",
21       "-msse2",
22       "-D__STDC_CONSTANT_MACROS",
23       "-D__STDC_LIMIT_MACROS",
24     ]
25
26     if (!is_debug) {
27       cflags += [
28         "-DNDEBUG",
29         "-DANGLE_DISABLE_TRACE",
30       ]
31     }
32   }
33 }
34
35 source_set("swiftshader_reactor") {
36   deps = [
37     "../Common:swiftshader_common",
38     "../../third_party/LLVM:swiftshader_llvm",
39   ]
40
41   sources = [
42     "Nucleus.cpp",
43     "Routine.cpp",
44     "RoutineManager.cpp",
45   ]
46
47   if (host_os == "win") {
48     sources += [
49       "DLL.cpp",
50     ]
51   }
52
53   configs += [
54     ":swiftshader_reactor_private_config",
55   ]
56
57   include_dirs = [
58     "..",
59     "../Common",
60     "../../third_party/LLVM/include/",
61   ]
62 }