Fix build for oss-fuzz
Without this, the oss-fuzz build fails with:
```
Step #3 - "compile-afl-address-x86_64": FAILED: unwinding_fuzzer stripped/unwinding_fuzzer
Step #3 - "compile-afl-address-x86_64": /src/aflplusplus/afl-clang-fast++ -fuse-ld=gold -lFuzzingEngine -Wl,--build-id -Wl,-z,max-page-size=16384 -Wl,--gc-sections -Wl,--icf=all -Wl,-O1 -Wl,-rpath=\$ORIGIN/. -Wl,-rpath-link=. -fsanitize=address -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -stdlib=libc++ -Wno-extra-semi-stmt -fno-sanitize=vptr @./unwinding_fuzzer.rsp -lpthread -lrt -o ./unwinding_fuzzer && strip -o ./stripped/unwinding_fuzzer ./unwinding_fuzzer
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/winscope_regular:zero.protolog.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/winscope_regular:zero.shell_transition.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/winscope_regular:zero.surfaceflinger_common.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/winscope_regular:zero.surfaceflinger_layers.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/winscope_regular:zero.surfaceflinger_transactions.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/graphics/winscope_common:zero.point.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/graphics/winscope_common:zero.rect.pbzero.o''
Step #3 - "compile-afl-address-x86_64": clang++: error: no such file or directory: ''obj/gen/protos/perfetto/trace/android/winscope_common:zero.winscope_extensions.pbzero.o''
```
I don't know:
* why it only fails on the ozz-fuzz docker image and not locally on CI
* why exactly changing `:` to `_` fixes the problem
but, in general, `:` is used by gn to split the directory from the
target name, so it's probably a good idea to avoid using it for
something else.
Tested by checking out oss-fuzz and perfetto (with the patch applied)
and running:
* `python infra/helper.py build_image perfetto`
* `python infra/helper.py build_fuzzers --sanitizer address --engine afl --architecture x86_64 perfetto ~/perfetto`
Reported-at: https://crbug.com/oss-fuzz/68755
Change-Id: I3e3f1f799d53cba676714bb2578ad15c513d6960
diff --git a/Android.bp b/Android.bp
index 4fe5a6a..4af731a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5629,7 +5629,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:cpp
+// GN: //protos/perfetto/trace/android:winscope_common_cpp
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_common_cpp",
srcs: [
@@ -5639,7 +5639,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:cpp
+// GN: //protos/perfetto/trace/android:winscope_common_cpp
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_common_cpp_gen",
srcs: [
@@ -5657,7 +5657,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:cpp
+// GN: //protos/perfetto/trace/android:winscope_common_cpp
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_common_cpp_gen_headers",
srcs: [
@@ -5679,7 +5679,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:lite
+// GN: //protos/perfetto/trace/android:winscope_common_lite
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_common_lite",
srcs: [
@@ -5689,7 +5689,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:lite
+// GN: //protos/perfetto/trace/android:winscope_common_lite
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_common_lite_gen",
srcs: [
@@ -5706,7 +5706,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:lite
+// GN: //protos/perfetto/trace/android:winscope_common_lite
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_common_lite_gen_headers",
srcs: [
@@ -5727,7 +5727,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:zero
+// GN: //protos/perfetto/trace/android:winscope_common_zero
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_common_zero",
srcs: [
@@ -5737,7 +5737,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:zero
+// GN: //protos/perfetto/trace/android:winscope_common_zero
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_common_zero_gen",
srcs: [
@@ -5755,7 +5755,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_common:zero
+// GN: //protos/perfetto/trace/android:winscope_common_zero
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_common_zero_gen_headers",
srcs: [
@@ -5841,7 +5841,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_extensions:zero
+// GN: //protos/perfetto/trace/android:winscope_extensions_zero
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_extensions_zero",
srcs: [
@@ -5871,7 +5871,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_extensions:zero
+// GN: //protos/perfetto/trace/android:winscope_extensions_zero
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_extensions_zero_gen",
srcs: [
@@ -5911,7 +5911,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_extensions:zero
+// GN: //protos/perfetto/trace/android:winscope_extensions_zero
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_extensions_zero_gen_headers",
srcs: [
@@ -5955,7 +5955,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:cpp
+// GN: //protos/perfetto/trace/android:winscope_regular_cpp
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_cpp",
srcs: [
@@ -5967,7 +5967,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:cpp
+// GN: //protos/perfetto/trace/android:winscope_regular_cpp
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_cpp_gen",
srcs: [
@@ -5989,7 +5989,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:cpp
+// GN: //protos/perfetto/trace/android:winscope_regular_cpp
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_cpp_gen_headers",
srcs: [
@@ -6015,7 +6015,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:lite
+// GN: //protos/perfetto/trace/android:winscope_regular_lite
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_lite",
srcs: [
@@ -6027,7 +6027,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:lite
+// GN: //protos/perfetto/trace/android:winscope_regular_lite
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_lite_gen",
srcs: [
@@ -6048,7 +6048,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:lite
+// GN: //protos/perfetto/trace/android:winscope_regular_lite
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_lite_gen_headers",
srcs: [
@@ -6073,7 +6073,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:zero
+// GN: //protos/perfetto/trace/android:winscope_regular_zero
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_zero",
srcs: [
@@ -6085,7 +6085,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:zero
+// GN: //protos/perfetto/trace/android:winscope_regular_zero
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_zero_gen",
srcs: [
@@ -6107,7 +6107,7 @@
],
}
-// GN: //protos/perfetto/trace/android:winscope_regular:zero
+// GN: //protos/perfetto/trace/android:winscope_regular_zero
genrule {
name: "perfetto_protos_perfetto_trace_android_winscope_regular_zero_gen_headers",
srcs: [
@@ -15594,7 +15594,7 @@
],
}
-// GN: [//protos/perfetto/trace:non_minimal_source_set, //protos/perfetto/trace/android:winscope_extensions:source_set]
+// GN: [//protos/perfetto/trace:non_minimal_source_set, //protos/perfetto/trace/android:winscope_extensions_source_set]
filegroup {
name: "perfetto_winscope_filegroup_proto",
srcs: [