Skip to content

Commit

Permalink
prepare-cross-toolchain-unix: Avoid executing clang
Browse files Browse the repository at this point in the history
Don't execute the source clang to check the resource directory;
when assembling a toolchain on a different system, we can't
assume that the source toolchain is executable. And when cross
building a toolchain for a foreign target, we can't assume we can
execute the target toolchain either.
  • Loading branch information
mstorsjo committed Aug 5, 2024
1 parent 462aee2 commit e7de34f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prepare-cross-toolchain-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DEST="$2"

: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}

CLANG_RESOURCE_DIR="$("$SRC/bin/clang" --print-resource-dir)"
CLANG_RESOURCE_DIR="$(echo "$SRC/lib/clang/"*)"
CLANG_VERSION=$(basename "$CLANG_RESOURCE_DIR")

# Copy the clang resource files (include, lib, share). The clang cross
Expand Down

0 comments on commit e7de34f

Please sign in to comment.