参考
方法1
直接在arm64机器或者容器里编译。
git clone https://android.googlesource.com/platform/external/perfetto/ && cd perfetto
tools/install-build-deps
tools/gn gen --args='is_debug=true is_clang=false' out/linux
tools/ninja -C out/linux tracebox traced traced_probes perfetto
方法2
交叉编译。
- 配置
git clone https://android.googlesource.com/platform/external/perfetto/ && cd perfetto
tools/install-build-deps --linux-arm
tools/gn gen --args='is_debug=true is_clang=false target_cpu="arm64" target_os="linux" target_triplet="aarch64-none-li
nux-gnu"' out/linux_arm64
配置完毕,在out/linux_arm64/args.gn中可以查看配置结果:
$ cat out/linux_arm64/args.gn
is_debug = true
is_clang = false
target_cpu = "arm64"
target_os = "linux"
target_triplet = "aarch64-none-linux-gnu"
在out/linux_arm64/toolchain.ninja中:
$ cat out/linux_arm64/toolchain.ninja | head -n 10
rule solink
command = aarch64-none-linux-gnu-g++ -fuse-ld=gold -shared ${ldflags} @${root_out_dir}/${target_output_name}${output_extension}.rsp ${solibs} ${libs} -Wl,-soname,${target_output_name}${output_extension} -o ${root_out_dir}/${target_output_name}${output_extension} && aarch64-none-linux-gnu-strip -o ${root_out_dir}/stripped/${target_output_name}${output_extension} ${root_out_dir}/${target_output_name}${output_extension}
...
- 编译
tools/ninja -C out/linux_arm64 tracebox traced traced_probes perfetto
标签:perfetto,target,编译,arm64,linux,output,out
From: https://www.cnblogs.com/pengdonglin137/p/18622584