manojgupta added a comment. Doesn't clang already has -grecord-gcc-switches option (https://clang.llvm.org/docs/ClangCommandLineReference.html#debug-information-flags) ? Repository: rL LLVM https://reviews.llvm.org/D54487