-
Notifications
You must be signed in to change notification settings - Fork 5
/
tbb.BUILD
43 lines (40 loc) · 1.38 KB
/
tbb.BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# this is an attempt at a bazel build file
# with skylark rules to build tbb with its own makefile
# then use the prebuilt library as an external dependency!
licenses(["notice"])
# make this target dependent, let bazel find them
tbb_bazel_release_build_dir="build_release"
tbb_bazel_debug_build_dir="build_debug"
genrule(
name = 'build_tbb',
# if available I want this built with crosstools
# I want the binaries to be picked up and placed in the appropriate directory
# this picks the build machines default gcc. useless
# tbb seems to hardcode CONLY=gcc and CPLUS=g++ if selecting linux.gcc.inc
# hence the PATH trick
cmd = 'cd external/tbb; \
export PATH=$$(dirname $(AR)):$$PATH; \
NM=$(NM) AR=$(AR) make tbb_build_prefix="build" ; \
cd ../../; \
echo cp external/tbb/build/build_{release,debug}/*.so.2 $(@D) ; \
cp external/tbb/build/build_{release,debug}/*.so.2 $(@D) ; \
',
outs = [
"libtbb.so.2",
"libtbbmalloc.so.2",
"libtbbmalloc_proxy.so.2",
"libtbb_debug.so.2",
"libtbbmalloc_debug.so.2",
"libtbbmalloc_proxy_debug.so.2",
],
)
cc_library(
name = "tbb",
hdrs = glob([
"include/serial/*.h",
"include/tbb/**/*.h",
]),
srcs = [ "libtbb.so.2"],
includes = ["include"],
visibility = ["//visibility:public"],
)