This is the minimal copy and paste version to get something running on Darwin.
Note the file platfrom_defs.h.inc. The section name has a ',' because of Mach-O. The section attribute length can be at most 16 characters. Thus, I had to remove the llvm part of the name.
The objcopy changes are beyond my me.
It stills fails the liniting. It claims that stddef.h and stdint.h are system headers. stddef.h and stdint.h are provided by the libc and the resource directory of clang ...
clang-tidy: error: expected unqualified-id [clang-diagnostic-error]
not useful