-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ALPS05556626] kernel: introduce LLVM=1 and gas toolchain to kenv.mk
Linux can now be built with LLVM=1, all necessary llvm params such as CC, LD, OBJCOPY, and NM will be set correctly. Introduce LLVM=1 to kenv.mk and drop legacy approach. To make it work, we have to also change build.config.mtk* files. With commit commit 2c71673913c12528c77bd0f75ce2c6adc9ac5059 ("Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple""), we must not use "CLANG_TRIPLE" in build commands, otherwise well have boot failures. MTK-Commit-Id: 52ced0a041efb0231efb134de7f821b3f678ced8 Change-Id: I76f2ec556e14d8ed28a89bc13e3b551fda625037 CR-Id: ALPS05556626 Feature: [Module]Kernel Maintenance Signed-off-by: Miles Chen <[email protected]>
- Loading branch information
1 parent
e9bb9b1
commit 890057d
Showing
5 changed files
with
84 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
ARCH=arm64 | ||
CLANG_TRIPLE=aarch64-linux-gnu- | ||
CROSS_COMPILE=aarch64-linux-androidkernel- | ||
CC=clang | ||
LD=ld.lld | ||
CROSS_COMPILE=aarch64-linux-gnu- | ||
LLVM=1 | ||
LLVM_IAS=1 | ||
LD_LIBRARY_PATH=prebuilts/clang/host/linux-x86/clang-r383902/lib64:$$LD_LIBRARY_PATH | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
# DEFCONFIG=defconfig | ||
KERNEL_DIR=kernel-4.19 | ||
CLANG_PREBUILT_BIN=prebuilts/clang/host/linux-x86/clang-r383902/bin | ||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin | ||
# for check scripts | ||
CC=clang | ||
LD=ld.lld | ||
AR=llvm-ar | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
OBJDUMP=llvm-objdump | ||
READELF=llvm-readelf | ||
OBJSIZE=llvm-size | ||
STRIP=llvm-strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
ARCH=arm64 | ||
CLANG_TRIPLE=aarch64-linux-gnu- | ||
CROSS_COMPILE=aarch64-linux-androidkernel- | ||
CC=clang | ||
LD=ld.lld | ||
CROSS_COMPILE=aarch64-linux-gnu- | ||
LLVM=1 | ||
LLVM_IAS=1 | ||
LD_LIBRARY_PATH=prebuilts/clang/host/linux-x86/clang-r383902/lib64:$$LD_LIBRARY_PATH | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
# DEFCONFIG=defconfig | ||
KERNEL_DIR=kernel-4.19 | ||
CLANG_PREBUILT_BIN=prebuilts/clang/host/linux-x86/clang-r383902/bin | ||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin | ||
# for check scripts | ||
CC=clang | ||
LD=ld.lld | ||
AR=llvm-ar | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
OBJDUMP=llvm-objdump | ||
READELF=llvm-readelf | ||
OBJSIZE=llvm-size | ||
STRIP=llvm-strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
ARCH=arm64 | ||
CLANG_TRIPLE=aarch64-linux-gnu- | ||
CROSS_COMPILE=aarch64-linux-androidkernel- | ||
CC=clang | ||
LD=ld.lld | ||
CROSS_COMPILE=aarch64-linux-gnu- | ||
LLVM=1 | ||
LLVM_IAS=1 | ||
LD_LIBRARY_PATH=prebuilts/clang/host/linux-x86/clang-r383902/lib64:$$LD_LIBRARY_PATH | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
# DEFCONFIG=defconfig | ||
KERNEL_DIR=kernel-4.19 | ||
CLANG_PREBUILT_BIN=prebuilts/clang/host/linux-x86/clang-r383902/bin | ||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin | ||
# for check scripts | ||
CC=clang | ||
LD=ld.lld | ||
AR=llvm-ar | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
OBJDUMP=llvm-objdump | ||
READELF=llvm-readelf | ||
OBJSIZE=llvm-size | ||
STRIP=llvm-strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
ARCH=arm | ||
CLANG_TRIPLE=arm-linux-gnueabi- | ||
CROSS_COMPILE=arm-linux-androidkernel- | ||
CC=clang | ||
LD=ld.lld | ||
|
||
CROSS_COMPILE=arm-linux-gnueabi- | ||
LLVM=1 | ||
|
||
# DEFCONFIG=defconfig | ||
KERNEL_DIR=kernel-4.19 | ||
CLANG_PREBUILT_BIN=prebuilts/clang/host/linux-x86/clang-r383902/bin | ||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin | ||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86 | ||
# for check scripts | ||
CC=clang | ||
LD=ld.lld | ||
AR=llvm-ar | ||
NM=llvm-nm | ||
OBJCOPY=llvm-objcopy | ||
OBJDUMP=llvm-objdump | ||
READELF=llvm-readelf | ||
OBJSIZE=llvm-size | ||
STRIP=llvm-strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters