-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliborc.BUILD
129 lines (121 loc) · 3.11 KB
/
liborc.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
# Note: orc-proto-wrapper.cc includes orc_proto.pb.cc
# and prefix with Adaptor.hh. The Adaptor.hh
# was supposed to capture platform discrepancies.
# However, since orc_proto.pb.cc can be compiled
# with cc_proto_library successfully, there is no need
# for orc-proto-wrapper.cc
cc_library(
name = "liborc",
srcs = glob([
"c++/src/*.cc",
"c++/src/*.hh",
"c++/src/io/*.cc",
"c++/src/io/*.hh",
"c++/src/wrap/*.cc",
"c++/src/wrap/*.hh",
"c++/src/wrap/*.h",
"c++/src/sargs/SearchArgument.cc",
"c++/src/sargs/SearchArgument.hh",
"c++/include/orc/*.hh",
],
exclude = [
"c++/src/wrap/orc-proto-wrapper.cc",
"c++/src/OrcHdfsFile.cc",
],) + select({
"@bazel_tools//src/conditions:windows": [],
"//conditions:default": [
"c++/src/OrcHdfsFile.cc",
],
}),
hdrs = [
"c++/include/orc/orc-config.hh",
"c++/include/orc/sargs/SearchArgument.hh",
"c++/src/wrap",
],
copts = [],
defines = [],
includes = [
"c++/include",
"c++/src",
"c++/src/io",
"c++/src/wrap",
"proto",
],
linkopts = [],
visibility = ["//visibility:public"],
deps = [
":libhdfspp",
":orc_cc_proto",
"@lz4",
"@snappy",
"@zlib",
#"@zstd",
"@com_github_facebook_zstd//:zstd",
],
)
cc_library(
name = "libhdfspp",
srcs = glob([
"c++/libs/libhdfspp/include/hdfspp/*.h",
],
exclude = [],
),
hdrs = [],
copts = [],
defines = [],
includes = [
"c++/libs/libhdfspp/include",
],
deps = [],
)
proto_library(
name = "orc_proto",
srcs = ["proto/orc_proto.proto"],
)
cc_proto_library(
name = "orc_cc_proto",
deps = [":orc_proto"],
)
genrule(
name = "orc-config_hh",
srcs = ["c++/include/orc/orc-config.hh.in"],
outs = ["c++/include/orc/orc-config.hh"],
cmd = ("sed " +
"-e 's/@ORC_VERSION@/1.6.7/g' " +
"-e 's/cmakedefine/define/g' " +
"$< >$@"),
)
genrule(
name = "Adaptor_hh",
srcs = ["c++/src/Adaptor.hh.in"],
outs = ["c++/src/Adaptor.hh"],
cmd = select({
"@bazel_tools//src/conditions:windows": (
"sed " +
"-e 's/cmakedefine HAS_PREAD/undef HAS_PREAD/g' " +
"-e 's/cmakedefine NEEDS_REDUNDANT_MOVE/undef NEEDS_REDUNDANT_MOVE/g' " +
"-e 's/cmakedefine NEEDS_Z_PREFIX/undef NEEDS_Z_PREFIX/g' " +
"-e 's/cmakedefine/define/g' " +
"$< >$@"
),
"@bazel_tools//src/conditions:darwin": (
"sed " +
"-e 's/cmakedefine NEEDS_REDUNDANT_MOVE/undef NEEDS_REDUNDANT_MOVE/g' " +
"-e 's/cmakedefine NEEDS_Z_PREFIX/undef NEEDS_Z_PREFIX/g' " +
"-e 's/cmakedefine/define/g' " +
"$< >$@"
),
"//conditions:default": (
"sed " +
"-e 's/cmakedefine INT64_IS_LL/undef INT64_IS_LL/g' " +
"-e 's/cmakedefine HAS_POST_2038/undef HAS_POST_2038/g' " +
"-e 's/cmakedefine NEEDS_REDUNDANT_MOVE/undef NEEDS_REDUNDANT_MOVE/g' " +
"-e 's/cmakedefine NEEDS_Z_PREFIX/undef NEEDS_Z_PREFIX/g' " +
"-e 's/cmakedefine/define/g' " +
"$< >$@"
),
}),
)