windres: Remove the rc filtering in the wrapper shell script
llvm-rc does this filtering internally now.
This commit is contained in:
1 parent
da4d3df5da
commit
ecdb6647b7
2 files changed
+2
-38
No files matched your search
@@ -73,7 +73,6 @@ normal GCC/binutils based MinGW.
|
||||
- The C++ exception unwinding in libunwind uses APIs that aren't available
|
||||
in the UWP/WinRT API subset.
|
||||
- The windres replacement, llvm-rc, isn't very mature and doesn't support
|
||||
everything that GNU windres does. Additionally, some part of the preprocessing
|
||||
is currently implemented in shell script, making it a bit slow.
|
||||
everything that GNU windres does.
|
||||
|
||||
Additionally, one may run into other minor differences between GCC and clang.
|
||||
@@ -189,42 +189,7 @@ case "${INPUT_FORMAT}" in
|
||||
# called with parameters like this: -DSTRING=\\\"1.2.3\\\"
|
||||
$CC -E $(echo $CPP_OPTIONS | sed 's/\\"/"/g') -xc -DRC_INVOKED=1 "${INPUT}" -o "${TMPDIR}/post.rc" || error "preprocessor failed"
|
||||
|
||||
# Parse the preprocessor output, looking for source file/line markers,
|
||||
# and discard output from *.h files. This matches what rc.exe and binutils windres
|
||||
# do.
|
||||
IFS='
|
||||
'
|
||||
output=0
|
||||
rm -f "${TMPDIR}/in.rc"
|
||||
for line in $(cat "${TMPDIR}/post.rc"); do
|
||||
case $line in
|
||||
\#\ *|\#line\ *)
|
||||
file="$(echo "$line" | awk '{print $3}' | sed 's/^"//;s/"$//')"
|
||||
case $file in
|
||||
*.h)
|
||||
output=0
|
||||
;;
|
||||
*)
|
||||
output=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
\#*)
|
||||
;;
|
||||
*)
|
||||
if [ $output -ne 0 ]; then
|
||||
# Plain "echo" affects potential quotes and escapes in the
|
||||
# content, with posix sh.
|
||||
cat<<EOF >> "${TMPDIR}/in.rc"
|
||||
$line
|
||||
EOF
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
unset IFS
|
||||
|
||||
llvm-rc $RC_OPTIONS "${TMPDIR}/in.rc" -c $CODEPAGE -fo "${TMPDIR}/in.res"
|
||||
llvm-rc $RC_OPTIONS "${TMPDIR}/post.rc" -c $CODEPAGE -fo "${TMPDIR}/in.res"
|
||||
case "${OUTPUT_FORMAT}" in
|
||||
"res")
|
||||
cat "${TMPDIR}/in.res" > "${OUTPUT}"
|
||||
|
||||
Reference in new issue
Block a user