Skip to content

Commit

Permalink
devtool-clang.sh: Widen EXTERNALSRC setting by removing overrides
Browse files Browse the repository at this point in the history
This helps in making it work on multiple architectures, we use same
clang to build for these anyway so it just reflects the reality

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed May 27, 2024
1 parent 5545bb8 commit 3e80a43
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/devtool-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
layerloc="$(dirname "$0")/../conf/layer.conf"
workspace="$(dirname "$0")/../../../workspace"

# Change target and SDK host as needed
target=riscv64
sdkhost=x86_64

origver=$(grep "LLVMVERSION =" < "$layerloc" | awk '{print $3}' | tr -d '"')

major=$(grep -e "set(LLVM_VERSION_MAJOR [0-9]" < "$workspace"/sources/llvm-project/cmake/Modules/LLVMVersion.cmake| cut -d ' ' -f 4 | sed "s/)//")
Expand All @@ -17,9 +21,9 @@ patch=$(grep -e "set(LLVM_VERSION_PATCH [0-9]" < "$workspace"/sources/llvm-proje
recipes="\
llvm-project-source-$origver \
clang \
clang-cross-riscv64 \
clang-crosssdk-x86_64 \
clang-cross-canadian-riscv64 \
clang-cross-$target \
clang-crosssdk-$sdkhost \
clang-cross-canadian-$target \
nativesdk-clang-glue \
compiler-rt \
compiler-rt-sanitizers \
Expand All @@ -39,3 +43,6 @@ for f in "$workspace"/appends/*.bbappend; do
done

sed -i -e "s/$origver/$major.$minor.$patch/g" "$workspace"/appends/llvm-project-source.bbappend
sed -i -e "s/:pn-clang-cross-$target//g" "$workspace"/appends/clang-cross_git.bbappend
sed -i -e "s/:pn-clang-cross-canadian-$target//g" "$workspace"/appends/clang-cross-canadian_git.bbappend
sed -i -e "s/:pn-clang-crosssdk-$sdkhost//g" "$workspace"/appends/clang-crosssdk_git.bbappend

0 comments on commit 3e80a43

Please sign in to comment.