[Android Software/Hacking General [Developers Only]] FSadino:
Trying to build with Clang inline with custom rom

Added all [MENTION=6842057]nathanchance[/MENTION] commits from here -> https://github.com/nathanchance/android-kernel-clang/tree/msm-3.18-pie

Device Tree

Kernel Source

Error:

FAILED: TARGET_KERNEL_BINARIES
/bin/bash -c "(PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/bin:\$PATH LD_LIBRARY_PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/lib64:\$LD_LIBRARY_PATH make -j8 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" Image.gz-dtb ) && (if grep -q '^CONFIG_OF=y' /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ/.config; then	echo -e \"Building DTBs\" ;	PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/bin:\$PATH LD_LIBRARY_PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/lib64:\$LD_LIBRARY_PATH make -j8 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" dtbs;	fi ) && (if grep -q '^CONFIG_MODULES=y' /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ/.config; then	echo -e \"Building Kernel Modules\" ;	PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/bin:\$PATH LD_LIBRARY_PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/lib64:\$LD_LIBRARY_PATH make -j8 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" modules;	fi )"
make: Entering directory '/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ'
Segmentation fault (core dumped)
Segmentation fault (core dumped)
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
Segmentation fault (core dumped)
Segmentation fault (core dumped)
CHK include/config/kernel.release
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/setlocalversion: linha 185: scm: comando não reconhecido
UPD include/config/kernel.release
Segmentation fault (core dumped)
Segmentation fault (core dumped)
GEN ./Makefile
Segmentation fault (core dumped)
CHK include/generated/uapi/linux/version.h
Segmentation fault (core dumped)
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Using /home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996 as source for kernel
Segmentation fault (core dumped)
HOSTCC scripts/kallsyms
HOSTCC scripts/sortextable
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
CC scripts/mod/empty.o
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/mod/modpost.o
CHK scripts/mod/devicetable-offsets.h
UPD scripts/mod/devicetable-offsets.h
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
HOSTCC scripts/mod/sumversion.o
SHIPPED scripts/dtc/dtc-parser.tab.h
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/dtc/dtc
HOSTLD scripts/mod/modpost
Segmentation fault (core dumped)
Segmentation fault (core dumped)
CC kernel/bounds.s
CHK include/generated/bounds.h
UPD include/generated/bounds.h
CC arch/arm64/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
UPD include/generated/asm-offsets.h
CALL /home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/checksyscalls.sh
Segmentation fault (core dumped)
LDS arch/arm64/kernel/vdso/vdso.lds
VDSOC arch/arm64/kernel/vdso/vgettimeofday.o
VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
[COLOR="Red"]error: invalid value 'tiny' in '-mcode-model tiny'[/COLOR]
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/arch/arm64/kernel/vdso/Makefile:68: recipe for target 'arch/arm64/kernel/vdso/vgettimeofday.o' failed
make[2]: *** [arch/arm64/kernel/vdso/vgettimeofday.o] Error 1
make[2]: ** Esperando que outros processos terminem.
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/arch/arm64/Makefile:150: recipe for target 'vdso_prepare' failed
make[1]: *** [vdso_prepare] Error 2
make[1]: Leaving directory '/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996'
[ 10% 9253/92495] Build hyb /home/fsadino/Android...external/hyphenation-patterns/hu//hyph-hu.pat.txt
21515 unique nodes, 102669 total
ninja: build stopped: subcommand failed.
20:23:59 ninja failed with: exit status 1

Any help will be very appreciated! Thanks in advance!