CGProfilePass is run by default in certain new pass manager optimization pipeline. Assemblers other than llvm as (such as gnu as) cannot recognize the .cgprofile entries generated and emitted from this pass, causing build time error.
This patch adds a new opt option "enable-npm-call-graph-profile" (on by default) and we turn it off when "-fno-integrated-as" is specified in clang.
Since CGProfilePass only exists in new pass manager, it's a bit awkward that we will pass a nop -mllvm option if legacy pass manager is used.
-DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER when building LLVM will be a good solution to make this consistent.
Further opinions are welcome.