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(
3939 visibility = ["//visibility:public" ],
4040)
4141
42- pkg_runfiles (
42+ pkg_filegroup (
4343 name = "extractor" ,
44- srcs = ["//swift/extractor" ],
44+ srcs = ["//swift/extractor:pkg " ],
4545 prefix = "tools/" + codeql_platform ,
4646)
4747
Original file line number Diff line number Diff line change 11load ("//swift:rules.bzl" , "swift_cc_binary" )
22load ("//misc/bazel/cmake:cmake.bzl" , "generate_cmake" )
3+ load ("//misc/bazel:pkg_runfiles.bzl" , "pkg_runfiles" )
34
45swift_cc_binary (
5- name = "extractor" ,
6+ name = "extractor.real " ,
67 srcs = glob ([
78 "*.h" ,
89 "*.cpp" ,
910 ]),
10- visibility = ["//swift:__pkg__" ],
1111 deps = [
1212 "//swift/extractor/infra" ,
1313 "//swift/extractor/invocation" ,
@@ -19,6 +19,19 @@ swift_cc_binary(
1919
2020generate_cmake (
2121 name = "cmake" ,
22- targets = [":extractor" ],
22+ targets = [":extractor.real " ],
2323 visibility = ["//visibility:public" ],
2424)
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"
44
55QLTEST_LOG=" $CODEQL_EXTRACTOR_SWIFT_LOG_DIR " /qltest.log
66
7- export LD_LIBRARY_PATH=" $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM "
8-
97EXTRACTOR=" $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM /extractor"
108SDK=" $CODEQL_EXTRACTOR_SWIFT_ROOT /qltest/$CODEQL_PLATFORM /sdk"
119
You can’t perform that action at this time.
0 commit comments