[PGO] Overriding IR profiling filename at compile time

Hi, I’m trying to specify the filename of the IR profiling output file, during compile time (not at runtime via the LLVM_PROFILE_FILE environment variable). The -fprofile-generate=<value> assumes <value> is a directory. The only way I could find is -fprofile-generate -Xclang -fprofile-instrument-path=/path/to/my/file.

  1. Is there a different way?
  2. Are cc1 options part of the official clang interface, and thus can be relied upon in production?