File tree Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ pkg_filegroup(
39
39
visibility = ["//visibility:public" ],
40
40
)
41
41
42
- pkg_runfiles (
42
+ pkg_filegroup (
43
43
name = "extractor" ,
44
- srcs = ["//swift/extractor" ],
44
+ srcs = ["//swift/extractor:pkg " ],
45
45
prefix = "tools/" + codeql_platform ,
46
46
)
47
47
Original file line number Diff line number Diff line change 1
1
load ("//swift:rules.bzl" , "swift_cc_binary" )
2
2
load ("//misc/bazel/cmake:cmake.bzl" , "generate_cmake" )
3
+ load ("//misc/bazel:pkg_runfiles.bzl" , "pkg_runfiles" )
3
4
4
5
swift_cc_binary (
5
- name = "extractor" ,
6
+ name = "extractor.real " ,
6
7
srcs = glob ([
7
8
"*.h" ,
8
9
"*.cpp" ,
9
10
]),
10
- visibility = ["//swift:__pkg__" ],
11
11
deps = [
12
12
"//swift/extractor/infra" ,
13
13
"//swift/extractor/invocation" ,
@@ -19,6 +19,19 @@ swift_cc_binary(
19
19
20
20
generate_cmake (
21
21
name = "cmake" ,
22
- targets = [":extractor" ],
22
+ targets = [":extractor.real " ],
23
23
visibility = ["//visibility:public" ],
24
24
)
25
+
26
+ sh_binary (
27
+ name = "extractor" ,
28
+ srcs = ["extractor.sh" ],
29
+ data = [":extractor.real" ],
30
+ )
31
+
32
+ pkg_runfiles (
33
+ name = "pkg" ,
34
+ srcs = [":extractor" ],
35
+ excludes = ["extractor.sh" ], # script gets copied as "extractor", no need for the original .sh file
36
+ visibility = ["//swift:__pkg__" ],
37
+ )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [[ " $( uname) " == Darwin ]]; then
4
+ export DYLD_FALLBACK_LIBRARY_PATH=$( dirname " $0 " )
5
+ else
6
+ export LD_LIBRARY_PATH=$( dirname " $0 " )
7
+ fi
8
+
9
+ exec -a " $0 " " $0 .real" " $@ "
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ mkdir -p "$CODEQL_EXTRACTOR_SWIFT_TRAP_DIR"
4
4
5
5
QLTEST_LOG=" $CODEQL_EXTRACTOR_SWIFT_LOG_DIR " /qltest.log
6
6
7
- export LD_LIBRARY_PATH=" $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM "
8
-
9
7
EXTRACTOR=" $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM /extractor"
10
8
SDK=" $CODEQL_EXTRACTOR_SWIFT_ROOT /qltest/$CODEQL_PLATFORM /sdk"
11
9
You can’t perform that action at this time.
0 commit comments