File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ toolchain_path_prefix="%{toolchain_path_prefix}"
7474# Sometimes this path may be an absolute path in which case we dont do anything because
7575# This is using the host toolchain to build.
7676if [[ ${toolchain_path_prefix} != /* ]]; then
77- toolchain_path_prefix=" ${script_dir} /../../${toolchain_path_prefix# external/ } "
77+ # shellcheck disable=SC2312
78+ toolchain_path_prefix=" $( dirname_shim " $( dirname_shim " ${script_dir} " ) " ) /${toolchain_path_prefix# external/ } "
7879fi
7980
8081if [[ ! -f ${toolchain_path_prefix} bin/clang ]]; then
@@ -101,7 +102,8 @@ function sanitize_option() {
101102 elif [[ ${opt} =~ ^-fsanitize-(ignore| black)list= [^/] ]] && [[ ${script_dir} == /* ]]; then
102103 # shellcheck disable=SC2206
103104 parts=(${opt/ =/ } ) # Split flag name and value into array.
104- printf " %s" " ${parts[0]} =${script_dir} /../../../${parts[1]} "
105+ # shellcheck disable=SC2312
106+ printf " %s" " ${parts[0]} =$( dirname_shim " $( dirname_shim " $( dirname_shim " ${script_dir} " ) " ) " ) /${parts[1]} "
105107 else
106108 printf " %s" " ${opt} "
107109 fi
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ toolchain_path_prefix="%{toolchain_path_prefix}"
108108# Sometimes this path may be an absolute path in which case we dont do anything because
109109# This is using the host toolchain to build.
110110if [[ ${toolchain_path_prefix} != /* ]]; then
111- toolchain_path_prefix=" ${script_dir} /../../${toolchain_path_prefix# external/ } "
111+ # shellcheck disable=SC2312
112+ toolchain_path_prefix=" $( dirname_shim " $( dirname_shim " ${script_dir} " ) " ) /${toolchain_path_prefix# external/ } "
112113 toolchain_path_prefix_abs=" $( cd " ${toolchain_path_prefix} " && pwd -P) /"
113114else
114115 toolchain_path_prefix_abs=" ${toolchain_path_prefix} "
@@ -128,7 +129,8 @@ function sanitize_option() {
128129 elif [[ ${opt} =~ ^-fsanitize-(ignore| black)list= [^/] ]] && [[ ${script_dir} == /* ]]; then
129130 # shellcheck disable=SC2206
130131 parts=(${opt/ =/ } ) # Split flag name and value into array.
131- printf " %s" " ${parts[0]} =${script_dir} /../../../${parts[1]} "
132+ # shellcheck disable=SC2312
133+ printf " %s" " ${parts[0]} =$( dirname_shim " $( dirname_shim " $( dirname_shim " ${script_dir} " ) " ) " ) /${parts[1]} "
132134 else
133135 printf " %s" " ${opt} "
134136 fi
You can’t perform that action at this time.
0 commit comments