Reland: [Remarks][Driver] Use different remark files when targeting multiple architec...
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 18 Nov 2019 18:09:31 +0000 (10:09 -0800)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 18 Nov 2019 19:17:38 +0000 (11:17 -0800)
commite15b26fbbd901315a1402f97e83abf29bdce9a9f
tree393e6ae3c1e98e38dca8ca25a955e98332036950
parent9d93893914086738c577a4f4f1089f6a004a2261
Reland: [Remarks][Driver] Use different remark files when targeting multiple architectures

When the driver is targeting multiple architectures at once, for things
like Universal Mach-Os, we need to emit different remark files for each
cc1 invocation to avoid overwriting the files from a different
invocation.

For example:

$ clang -c -o foo.o -fsave-optimization-record -arch x86_64 -arch x86_64h

will create two remark files:

* foo-x86_64.opt.yaml
* foo-x86_64h.opt.yaml
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/darwin-opt-record.c [new file with mode: 0644]