Hi,
I've posted that question on Chromium-discuss group but then was pointed that there is actually a group dedicated for crashpad dev so I'm reposting it here:
I'm trying to build crashpad for tvOS, I've used iOS setup with little changes
like replacing -mios-version-min flag to -mtvos-version-min or changing sdk from iphoneos to appletvos and sdk platform from iPhoneOS to AppleTVOS, based on that I'm using ./build/ios/setup_ios_gn.py script to generate configs and based on Debug-iphoneos I'm creating Debug-appletvos one then I'm running build command: ninja -c out/Debug-appletvos.
Example compile command after the changes looks like this:
clang++ -MMD -MF obj/util/mach/util.exception_
ports.o.d -DZLIB_CONST -DCRASHPAD_ZLIB_SOURCE_SYSTEM -Igen/third_party/crashpad/
crashpad -Igen -I../.. -I../../third_party/mini_
chromium/mini_chromium -Igen
-I../../compat/mac
-I../../compat/ios -I../../compat/non_win -Wall -Wendif-labels -Werror
-Wextra -Wextra-semi -Wheader-hygiene -Wnewline-eof -Wno-missing-field-
initializers -Wno-unused-parameter -Wsi
gn-compare
-Wstring-conversion -Wvla -fno-exceptions -fno-rtti
-fno-strict-aliasing -fobjc-call-cxx-cdtors -fstack-protector-all
-fvisibility-inlines-hidden -fvisibility=hidden -isysroot
/Applications/X
code.app/Contents/Developer/Platforms/AppleTVOS.platform/
Developer/SDKs/AppleTVOS14.3.
sdk -arch arm64 -mtvos-version-min=14.0 -g -Wexit-time-destructors -Wimplicit-fallthrough -std=c++14 -c ../../util/m
ach/exception_ports.cc -o obj/util/mach/util.exception_
ports.o
unfortunately it fails with:
../../util/mach/exception_ports.cc:61:30: error: 'task_get_exception_ports' is unavailable: not available on tvOS
there are more similar problems:
'fork' has been explicitly marked unavailable here
pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
or
error: 'mach_msg' is unavailable: not available on tvOS
I'm
aware of that I did some hacking within ios related build files to make
it compile for tvos so might be I still need to do something more but I
would like to ask if anyone did tried to build crashpad or other
project which relies on mini_chromium for tvOS? Do I need to put more
focus on build files to make it using some posix implementations or it's
just not supported right now?
BTW. I'm working on macOS Big Sur v11.4
Thanks for any hints/advice!
Regards,
tomek/