wrappers: Add a wrapper for clang-scan-deps

This picks the architecture by looking for a triple prefix in the
nested command, and passes it as an explicit flag, to let
clang-scan-deps find it.

We also pass -stdlib=libc++, to let it find the libc++ headers
as expected.
This commit is contained in:
Martin Storsjö committed 2024-05-02 20:03:56 +03:00
1 parent 5ba9e1e402
commit 06bd759e50
3 files changed
+174

No files matched your search

+2
View File
@@ -126,6 +126,7 @@ if [ -n "$HOST" ] && [ -n "$EXEEXT" ]; then
done
fi
$CC wrappers/clang-target-wrapper.c -o "$PREFIX/bin/clang-target-wrapper$EXEEXT" -O2 -Wl,-s $WRAPPER_FLAGS
$CC wrappers/clang-scan-deps-wrapper.c -o "$PREFIX/bin/clang-scan-deps-wrapper$EXEEXT" -O2 -Wl,-s $WRAPPER_FLAGS
$CC wrappers/llvm-wrapper.c -o "$PREFIX/bin/llvm-wrapper$EXEEXT" -O2 -Wl,-s $WRAPPER_FLAGS
if [ -n "$EXEEXT" ]; then
# For Windows, we should prefer the executable wrapper, which also works
@@ -141,6 +142,7 @@ for arch in $ARCHS; do
for exec in clang clang++ gcc g++ c++ as; do
ln -sf clang-target-wrapper$CTW_SUFFIX $arch-w64-$target_os-$exec$CTW_LINK_SUFFIX
done
ln -sf clang-scan-deps-wrapper$CTW_SUFFIX $arch-w64-$target_os-clang-scan-deps$CTW_LINK_SUFFIX
for exec in addr2line ar ranlib nm objcopy readelf size strings strip llvm-ar llvm-ranlib; do
if [ -n "$EXEEXT" ]; then
link_target=llvm-wrapper