I've tried with these commands:
Code: Select all
$(NDK)/aarch64-linux-android21-clang ./main.c -s -static -pthread -O3 -flto -std=gnu11 -DNDEBUG -Wall -Wextra -lm -march=armv8-a -DNEON -fPIE -o ./Pedone_armv8 -fprofile-generate
qemu-aarch64 ./Pedone_armv8 pgo
$(NDK)/llvm-profdata merge -output=profile.profdata *.profraw
$(NDK)/aarch64-linux-android21-clang ./main.c -s -static -pthread -O3 -flto -std=gnu11 -DNDEBUG -Wall -Wextra -lm -march=armv8-a -DNEON -fPIE -o ./Pedone_armv8 -fprofile-use=profile.profdata
The building process end at "qemu-aarch64 ./Pedone_armv8 pgo" with a segmentation fault at the and of the execution so something is missing or is wrong with the first command.
What are the correct commands for building with pgo? What emulator have you used to create the profile files for the build?