I build this code using the following command on Arch Linux virtual machine running in Crostini on top of Chrome OS
clang++ vulkaninfo.cpp -DVK_ENABLE_BETA_EXTENSIONS -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -march=x86-64 -mtune=generic -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fno-builtin-memcmp -Wimplicit-fallthrough -std=c++11 -fno-rtti -fvisibility=hidden -Wl,--sort-common,--as-needed,-z,relro,-z,now -ldl /usr/lib/libxcb.so /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libX11.so /usr/lib/libXext.so /usr/lib/libwayland-client.so -O2
Some of those flags are probably unnecessary and could be removed for simplicity.