File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,18 @@ elif [[ ${BASH_SOURCE[0]} == "/"* ]]; then
43
43
# This script is at _execroot_/external/_repo_name_/bin/clang_wrapper.sh
44
44
execroot_path=" ${BASH_SOURCE[0]%/*/*/*/* } "
45
45
clang=" ${execroot_path} /%{toolchain_path_prefix}bin/clang"
46
- exec " ${clang} " " ${@ } "
46
+
47
+ # If we're compiling with -fsanitize-ignorelist, we need fix that path
48
+ args=(" $@ " )
49
+ for (( i = 0 ; i < $# ; i++ )) ; do
50
+ if [[ " ${args[i]} " =~ ^-fsanitize-(ignore| black)list= [^/] ]]; then
51
+ path=" ${args[i]#* =} "
52
+ args[i]=" -fsanitize-blacklist=${execroot_path} /${path} "
53
+ break
54
+ fi
55
+ done
56
+
57
+ exec " ${clang} " " ${args[@]} "
47
58
else
48
59
echo >&2 " ERROR: could not find clang; PWD=\" ${PWD} \" ; PATH=\" ${PATH} \" ."
49
60
exit 5
You can’t perform that action at this time.
0 commit comments