Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-llvm: Commit

external/llvm


Commit MetaInfo

Revision3cd3c1739a840c91d65fb4318ba0f59fcc09d9d7 (tree)
Time2019-10-05 16:11:39
AuthorMauro Rossi <issor.oruam@gmai...>
CommiterMauro Rossi

Log Message

DO NOT MERGE: android: translate soong build rules for libLLVM90

These changes are applied to build external/llvm90 project
and avoid conflicts with external/llvm project
Changes in mesa main Android.mk are required for libLLVM90
shared library dependency and cflag -DHAVE_LLVM=0x0900

The changelog is described by means of modules and variables
which needed to be renamed:

#rename the target shared library and all static libraries

find . -type f -name "*.bp" -exec sed -i 's/libLLVM/libLLVM90/g' {} +

#rename the boostrap and contextual build paths

find . -type f -name "*.bp" -exec sed -i 's/soong\-llvm/\soong-llvm90/g' {} +
find . -type f -name "*.go" -exec sed -i 's/android\/soong\/llvm/android\/soong\/llvm90/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_llvm90_components/g' {} +
find . -type f -name '*.go' -exec sed -i 's/force_build_llvm_components/force_build_llvm90_components/g' {} +

#rename all module that gave 'already defined' error

find . -type f -name '*.bp' -exec sed -i 's/llvm-aarch64-defaults/llvm90-aarch64-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-aarch64-headers/llvm90-aarch64-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-amdgpu-defaults/llvm90-amdgpu-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-amdgpu-headers/llvm90-amdgpu-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-arm-defaults/llvm90-arm-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-arm-headers/llvm90-arm-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-defaults/llvm90-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-defaults-no-generated-headers/llvm90-defaults-no-generated-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-aarch64/llvm90-gen-aarch64/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-amdgpu/llvm90-gen-amdgpu/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-r600/llvm90-gen-r600/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-arm/llvm90-gen-arm/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-attributes/llvm90-gen-attributes/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-core/llvm90-gen-core/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-intrinsics/llvm90-gen-intrinsics/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-libdriver/llvm90-gen-libdriver/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-mips/llvm90-gen-mips/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-revision/llvm90-gen-revision/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-x86/llvm90-gen-x86/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-headers/llvm90-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-headers-no-generated-headers/llvm90-headers-no-generated-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-lib-defaults/llvm90-lib-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-mips-defaults/llvm90-mips-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-mips-headers/llvm90-mips-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-tblgen/llvm90-tblgen/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-x86-defaults/llvm90-x86-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-x86-headers/llvm90-x86-headers/g' {} +

#rename llvm-gen-instcombine module

find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-instcombine/llvm90-gen-instcombine/g' {} +

#rename the binaries

find . -type f -name '*.bp' -exec sed -i 's/LLVMHello/LLVM90Hello/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/LLVMgold/LLVM90gold/g' {} +

#rename the TableGen binary module and variable in different files

find . -type f -name '*.go' -exec sed -i 's/LLVM TableGen/LLVM90 TableGen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm-tblgen/llvm90-tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvmTblgen/llvm90Tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/tblgenRule/tblgenRule90/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm_tblgen/llvm90_tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm_tblgen/llvm90_tblgen/g' {} +
find . -type f -name 'tdtags' -exec sed -i 's/llvm-tblgen/llvm90-tblgen/g' {} +

#rename the include paths

find . -type f -name '*.bp' -exec sed -i 's/external\/llvm/external\/llvm90/g' {} +
find . -type f -name '*.go' -exec sed -i 's/external\/llvm/external\/llvm90/g' {} +

#rename package, registered types and llvm-config

find . -type f -name '*.go' -exec sed -i 's/package llvm/package llvm90/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm_tblgen/llvm90_tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm_defaults/llvm90_defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/ llvm-config / llvm90-config /g' {} +
find . -type f -name '*.bp' -exec sed -i 's/"llvm-config"/"llvm90-config"/g' {} +
find . -type f -name '*.go' -exec sed -i 's/"llvm-config"/"llvm90-config"/g' {} +

Change Summary

Show on old repository browser