Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DO NOT MERGE: android: translate soong build rules for libLLVM17
Changes to side build external/llvm-project project (llvm 17 version) and avoid conflicts with external/llvm project targets and variables Changes in mesa main Android.mk are required for libLLVM17 shared library dependency and cflag -DMESA_LLVM_VERSION_STRING=\"17.0\" The changelog is described by means of modules and variables which needed to be renamed in external/llvm-project/llvm/ path: #rename the target shared library and all static libraries find . -type f -name "*.bp" -exec sed -i 's/libLLVM/libLLVM17/g' {} + #rename the boostrap and contextual build paths find . -type f -name "*.bp" -exec sed -i 's/soong\-llvm/\soong-llvm17/g' {} + find . -type f -name "*.go" -exec sed -i 's/android\/soong\/llvm/android\/soong\/llvm17/g' {} + #rename force_build_llvm_components type and module name find . -type f -name '*.bp' -exec sed -i 's/force_build_llvm_components/force_build_llvm17_components/g' {} + find . -type f -name '*.go' -exec sed -i 's/force_build_llvm_components/force_build_llvm17_components/g' {} + #rename all module that gave 'already defined' error find . -type f -name '*.bp' -exec sed -i 's/llvm-aarch64-defaults/llvm17-aarch64-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-aarch64-headers/llvm17-aarch64-headers/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-amdgpu-defaults/llvm17-amdgpu-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-amdgpu-headers/llvm17-amdgpu-headers/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-arm-defaults/llvm17-arm-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-arm-headers/llvm17-arm-headers/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-defaults/llvm17-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-defaults-no-generated-headers/llvm17-defaults-no-generated-headers/g' {} + #note the following line replaced all llvm-gen-* entries of the previous versions find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-/llvm17-gen-/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-headers/llvm17-headers/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-headers-no-generated-headers/llvm17-headers-no-generated-headers/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-lib-defaults/llvm17-lib-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-mips-defaults/llvm17-mips-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-mips-headers/llvm17-mips-headers/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-tblgen/llvm17-tblgen/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-x86-defaults/llvm17-x86-defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm-x86-headers/llvm17-x86-headers/g' {} + #COMMENTED AS NOT NEEDED ANYMORE rename llvm-gen-instcombine module #find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-instcombine/llvm17-gen-instcombine/g' {} + #rename the binaries find . -type f -name '*.bp' -exec sed -i 's/LLVMHello/LLVM17Hello/g' {} + find . -type f -name '*.bp' -exec sed -i 's/LLVMgold/LLVM17gold/g' {} + #rename the TableGen binary module and variable in different files find . -type f -name '*.go' -exec sed -i 's/LLVM TableGen/LLVM17 TableGen/g' {} + find . -type f -name '*.go' -exec sed -i 's/llvm-tblgen/llvm17-tblgen/g' {} + find . -type f -name '*.go' -exec sed -i 's/llvmTblgen/llvm17Tblgen/g' {} + find . -type f -name '*.go' -exec sed -i 's/tblgenRule/tblgenRule17/g' {} + find . -type f -name '*.bp' -exec sed -i 's/llvm_tblgen/llvm17_tblgen/g' {} + find . -type f -name '*.go' -exec sed -i 's/llvm_tblgen/llvm17_tblgen/g' {} + find . -type f -name 'tdtags' -exec sed -i 's/llvm-tblgen/llvm17-tblgen/g' {} + #COMMENTED AS NOT NEEDED in external/llvm-project (was: rename the include paths) #find . -type f -name '*.bp' -exec sed -i 's/external\/llvm/external\/llvm17/g' {} + #find . -type f -name '*.go' -exec sed -i 's/external\/llvm/external\/llvm17/g' {} + #rename package, registered types and llvm-config find . -type f -name '*.go' -exec sed -i 's/package llvm/package llvm17/g' {} + find . -type f -name '*.go' -exec sed -i 's/llvm_tblgen/llvm17_tblgen/g' {} + find . -type f -name '*.go' -exec sed -i 's/llvm_defaults/llvm17_defaults/g' {} + find . -type f -name '*.bp' -exec sed -i 's/ llvm-config / llvm17-config /g' {} + find . -type f -name '*.bp' -exec sed -i 's/"llvm-config"/"llvm17-config"/g' {} + find . -type f -name '*.go' -exec sed -i 's/"llvm-config"/"llvm17-config"/g' {} +
- Loading branch information