mirror of
https://abf.rosa.ru/djam/llvm801.git
synced 2025-02-23 17:52:51 +00:00
24 lines
861 B
Bash
24 lines
861 B
Bash
![]() |
#!/bin/sh
|
||
|
# Author: mikhailnov
|
||
|
# Clean flags that clang does not know to fix building QtWebEngine with clang
|
||
|
|
||
|
# _CLANG_ must be changed to /usr/bin/clang++ and then to /usr/bin/clang in another copy of this wrapper
|
||
|
if echo "$@" | grep -qE 'fvar-tracking-assignments|frecord-gcc-switches'
|
||
|
then
|
||
|
echo "DEBUG: clang-wrapper: arguements will be cut-out!"
|
||
|
echo "DEBUG: arguements were: "
|
||
|
echo "========================="
|
||
|
echo "$@"
|
||
|
echo "========================="
|
||
|
new_args="$(echo "$@" | sed -e 's/-fvar-tracking-assignments//g' -e 's/-frecord-gcc-switches//g')"
|
||
|
echo "DEBUG: new arguements are with and without expansion: "
|
||
|
echo "========================="
|
||
|
echo ${new_args}
|
||
|
echo "========================="
|
||
|
echo "${new_args}"
|
||
|
# https://stackoverflow.com/a/37141139 (??)
|
||
|
_CLANG_ ${new_args} || _CLANG_ "${new_args}"
|
||
|
else
|
||
|
_CLANG_ "$@"
|
||
|
fi
|