File tree Expand file tree Collapse file tree 5 files changed +71
-15
lines changed Expand file tree Collapse file tree 5 files changed +71
-15
lines changed Original file line number Diff line number Diff line change 29
29
- run : npm install -g @bazel/bazelisk
30
30
- name : run build
31
31
run : |
32
- sudo apt-get install gperf -y
32
+ sudo apt-get install gperf libaio-dev -y
33
33
bazel build //:release-tars
Original file line number Diff line number Diff line change 1
- load ("@rules_foreign_cc//tools/build_defs:configure.bzl" , "configure_make" )
2
1
3
- configure_make (
4
- name = "liburing" ,
5
- configure_options = [
6
- ],
7
- lib_source = "@liburing//:all" ,
8
- out_lib_dir = "lib" ,
9
- visibility = ["//visibility:public" ],
10
- )
Original file line number Diff line number Diff line change
1
+ # vim: ft=bzl
2
+
3
+ genrule (
4
+ name = "compat_h" ,
5
+ outs = [
6
+ "src/include/liburing/compat.h" ,
7
+ ],
8
+ tools = [
9
+ "configure" ,
10
+ ],
11
+ cmd = "./$(location configure) --compat=$@" ,
12
+ )
13
+
14
+ cc_library (
15
+ name = "liburing" ,
16
+ srcs = glob (["src/*.c" ]) + [
17
+ "src/syscall.h" ,
18
+ ],
19
+ hdrs = [
20
+ ":compat_h" ,
21
+ "src/include/liburing.h" ,
22
+ "src/include/liburing/barrier.h" ,
23
+ "src/include/liburing/io_uring.h" ,
24
+ ],
25
+ includes = ["src/include" ],
26
+ copts = ["-w" ],
27
+ visibility = ["//visibility:public" ],
28
+ )
Original file line number Diff line number Diff line change
1
+ --- configure 2020-05-06 23:39:54.156690069 +0800
2
+ +++ liburing-liburing-0.6/configure 2020-05-06 23:40:57.021601025 +0800
3
+ @@ -30,6 +30,8 @@ for opt do
4
+ ;;
5
+ --cc=*) cc="$optarg"
6
+ ;;
7
+ + --compat=*) compat_h="$optarg"
8
+ + ;;
9
+ *)
10
+ echo "ERROR: unkown option $opt"
11
+ echo "Try '$0 --help' for more information"
12
+ @@ -56,6 +58,9 @@ fi
13
+ if test -z "$datadir"; then
14
+ datadir="$prefix/share"
15
+ fi
16
+ + if test -z "$compat_h"; then
17
+ + compat_h="src/include/liburing/compat.h"
18
+ + fi
19
+
20
+ if test x"$libdir" = x"$libdevdir"; then
21
+ relativelibdir=""
22
+ @@ -285,7 +290,7 @@ fi
23
+ echo "CC=$cc" >> $config_host_mak
24
+
25
+ # generate compat.h
26
+ - compat_h="src/include/liburing/compat.h"
27
+ + # compat_h="src/include/liburing/compat.h"
28
+ cat > $compat_h << EOF
29
+ /* SPDX-License-Identifier: MIT */
30
+ #ifndef LIBURING_COMPAT_H
Original file line number Diff line number Diff line change 14
14
# limitations under the License.
15
15
#
16
16
# @author ZhongXiu Hao <[email protected] >
17
+ # @author liubang <[email protected] >
17
18
18
19
load ("@rules_jvm_external//:defs.bzl" , "maven_install" )
19
20
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" , "http_jar" )
@@ -44,12 +45,18 @@ def include_repositories():
44
45
],
45
46
)
46
47
48
+ # liburing
47
49
http_archive (
48
50
name = "liburing" ,
49
- build_file_content = all_content ,
50
- strip_prefix = "liburing-liburing-0.7" ,
51
- urls = [
52
- "https://github.com/axboe/liburing/archive/liburing-0.7.tar.gz" ,
51
+ build_file = "@//thirdparty/liburing:liburing.BUILD" ,
52
+ urls = ["https://github.com/axboe/liburing/archive/liburing-0.6.tar.gz" ],
53
+ sha256 = "cf718a0a60c3a54da7ec82a0ca639a8e55d683f931b9aba9da603b849db185de" ,
54
+ strip_prefix = "liburing-liburing-0.6" ,
55
+ patch_args = [
56
+ "-p0" ,
57
+ ],
58
+ patches = [
59
+ "@//thirdparty/liburing:liburing.patch" ,
53
60
],
54
61
)
55
62
@@ -179,7 +186,7 @@ def include_repositories():
179
186
"@//thirdparty/folly:folly1.patch" ,
180
187
],
181
188
patch_args = [
182
- "-p1"
189
+ "-p1" ,
183
190
],
184
191
urls = [
185
192
"https://github.com/facebook/folly/releases/download/v2020.10.26.00/folly-v2020.10.26.00.tar.gz" ,
You can’t perform that action at this time.
0 commit comments