Turns out you need an Info.plist with CFBundleIdentifier key (this is the only key required),
then
clang++ -std=c++20 -O2 -o hello -sectcreate __TEXT __info_plist Info.plist main.cpp
Otherwise you'll need an app bundle if you're not embedding Info.plist into your binary.