File tree Expand file tree Collapse file tree 3 files changed +45
-15
lines changed
Expand file tree Collapse file tree 3 files changed +45
-15
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ cc_binary (
2+ name = "example" ,
3+ srcs = glob ([
4+ "*.cc" ,
5+ ]),
6+ data = [
7+ "example.so" ,
8+ ],
9+ linkstatic = True ,
10+ deps = [
11+ ":ray_api" ,
12+ ],
13+ )
14+
15+ cc_binary (
16+ name = "example.so" ,
17+ srcs = glob ([
18+ "*.cc" ,
19+ ]),
20+ linkopts = ["-shared" ],
21+ linkstatic = True ,
22+ deps = [
23+ ":ray_api" ,
24+ ],
25+ )
26+
27+ cc_library (
28+ name = "ray_api" ,
29+ srcs = [
30+ "thirdparty/lib/libray_api.so" ,
31+ ],
32+ hdrs = glob ([
33+ "thirdparty/include/**/*.h" ,
34+ "thirdparty/include/**/*.hpp" ,
35+ ]),
36+ linkopts = ["-Wl,-rpath,./" ],
37+ strip_include_prefix = "thirdparty/include" ,
38+ visibility = ["//visibility:public" ],
39+ )
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Cause the script to exit if a single command fails.
3+ # Cause the script to exit if a single command fails.
44set -e
55
6- bazel --nosystem_rc --nohome_rc build //cpp/example:example
6+ ROOT_DIR=" $( cd " $( dirname " ${BASH_SOURCE:- $0 } " ) " || exit ; pwd) "
7+
8+ bazel --nosystem_rc --nohome_rc build //:example
79if [[ " $OSTYPE " == " darwin" * ]]; then
8- bazel-bin/cpp/example /example
10+ DYLD_LIBRARY_PATH= " $ROOT_DIR /thirdparty/lib " " ${ROOT_DIR} " / bazel-bin/example
911else
10- bazel-bin/cpp/example /example
12+ LD_LIBRARY_PATH= " $ROOT_DIR /thirdparty/lib " " ${ROOT_DIR} " / bazel-bin/example
1113fi
You can’t perform that action at this time.
0 commit comments