File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 42
42
test_args=(
43
43
" --extra_toolchains=${toolchain_name} "
44
44
" --copt=-v"
45
+ " --linkopt=-Wl,-v"
45
46
" --linkopt=-Wl,-t"
46
47
)
47
48
Original file line number Diff line number Diff line change @@ -34,9 +34,7 @@ filegroup(
34
34
35
35
filegroup(
36
36
name = "ld",
37
- srcs = [
38
- "bin/ld.lld",
39
- ],
37
+ srcs = glob(["bin/ld.lld", "bin/ld64.lld"]),
40
38
)
41
39
42
40
filegroup(
Original file line number Diff line number Diff line change @@ -56,12 +56,14 @@ function parse_option() {
56
56
57
57
if [[ -f %{toolchain_path_prefix}bin/clang ]]; then
58
58
execroot_path=" "
59
+ execroot_abs_path=" ${PWD} /"
59
60
elif [[ ${BASH_SOURCE[0]} == " /" * ]]; then
60
61
# Some consumers of `CcToolchainConfigInfo` (e.g. `cmake` from rules_foreign_cc)
61
62
# change CWD and call $CC (this script) with its absolute path.
62
63
# For cases like this, we'll try to find `clang` through an absolute path.
63
64
# This script is at _execroot_/external/_repo_name_/bin/cc_wrapper.sh
64
65
execroot_path=" ${BASH_SOURCE[0]%/*/*/*/* } /"
66
+ execroot_abs_path=" $( cd " ${execroot_path} " && pwd -P) /"
65
67
else
66
68
echo >&2 " ERROR: could not find clang; PWD=\" ${PWD} \" ; PATH=\" ${PATH} \" ."
67
69
exit 5
@@ -71,6 +73,8 @@ function sanitize_option() {
71
73
local -r opt=$1
72
74
if [[ ${opt} == * /cc_wrapper.sh ]]; then
73
75
printf " %s" " ${execroot_path} %{toolchain_path_prefix}bin/clang"
76
+ elif [[ ${opt} == " -fuse-ld=ld64.lld" ]]; then
77
+ echo " -fuse-ld=${execroot_abs_path} %{toolchain_path_prefix}bin/ld64.lld"
74
78
elif [[ ${opt} =~ ^-fsanitize-(ignore| black)list= [^/] ]]; then
75
79
# shellcheck disable=SC2206
76
80
parts=(${opt/ =/ } ) # Split flag name and value into array.
You can’t perform that action at this time.
0 commit comments