Open s1341 opened 4 years ago
Thanks for the detailed write-up š I started running through this a few days ago, but some other tasks came up. I might not get to this soon, just wanted to let you know.
Thanks for the update. Let me know if you need any help/info. Iām happy to run debug/development builds.
Hi,
Following up from https://github.com/sourcegraph/sourcegraph/issues/9, trying to get useful lsif data from the android kernel.
I did the following:
build.config
file (in the wahoo-pie root) to point it to my aosp-clang toolchain:-ifeq ($(cc-name),clang) +ifeq ($(findstring clang,$(cc-name)),clang) ifneq ($(CROSS_COMPILE),) CLANG_TRIPLE ?= $(CROSS_COMPILE) CLANG_TARGET := --target=$(notdir $(CLANG_TRIPLE:%-=%))
pushd prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin ln -s ../../../../../../aosp-clang/clang-r365631c/bin/clang.real clangp popd
pushd prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin ln -s ../../../../../../aosp-clang/clang-r365631c/bin/clang.real clang popd
diff --git a/build.sh b/build.sh index 73eb3fc..f72cc57 100755 --- a/build.sh +++ b/build.sh @@ -268,7 +268,7 @@ echo "========================================================" echo " Building kernel"
set -x -(cd ${OUT_DIR} && make O=${OUT_DIR} "${TOOL_ARGS[@]}" ${MAKE_ARGS}) +(cd ${OUT_DIR} && env CLEAN=true ABSOUTDIR=/tmp/lsifout ABSROOTDIR=
pwd
~/src/lsif-cpp/generate-csv make O=${OUT_DIR} ${MAKE_ARGS}) set +xif [ -n "${POST_KERNEL_BUILD_CMDS}" ]; then
ā°ā[ā]$ CXX=clang++ PATH=~/src/aosp_kernel/wahoo-pie/aosp-clang/clang-r365631c/bin:$PATH ./build ++ dirname ./build
-cmd="$1" +cmd="$@"
FLAGS="-Xclang -load -Xclang $(realpath "$(dirname "${BASH_SOURCE[0]}")")/clang/libclang-index-plugin.so -Xclang -add-plugin -Xclang dxr-index -Xclang -plugin-arg-dxr-index -Xclang ." export CXX="clang++ $FLAGS" @@ -37,7 +37,7 @@ echo "Running... $cmd" CXX="$CXX" \ CC="$CC" \ DXR_CXX_CLANG_TEMP_FOLDER="$ABSOUTDIR" \
bash -c "$cmd CC=\"$CC\" HOSTCC=clang" )
echo
pushd ~/src/lsif-cpp PATH=~/src/aosp_kernel/wahoo-pie/aosp-clang/clang-r365631c/bin:$PATH CXX=clang++ ./build popd
./build/build.sh
I've attached the output dump.lsif.zip. Note that it doesn't include the words 'read' or 'vfork', which should definitely be parts of symbols in the kernel.
I'd appreciate any direction or help you could give me...
Thanks, s1341