forked from OSchip/llvm-project
[Driver][Windows] Add dependent lib argument for -fprofile-generate and -fcs-profile-generate
Follows on from r360674 which added it for -fprofile-instr-generate. Differential Revision: https://reviews.llvm.org/D62200 llvm-svn: 361368
This commit is contained in:
parent
de6038b265
commit
72fea1d258
|
@ -803,6 +803,10 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
|
|||
CmdArgs.push_back("-fprofile-instrument=csllvm");
|
||||
}
|
||||
if (PGOGenArg) {
|
||||
if (TC.getTriple().isWindowsMSVCEnvironment()) {
|
||||
CmdArgs.push_back(Args.MakeArgString("--dependent-lib=" +
|
||||
TC.getCompilerRT(Args, "profile")));
|
||||
}
|
||||
if (PGOGenArg->getOption().matches(
|
||||
PGOGenerateArg ? options::OPT_fprofile_generate_EQ
|
||||
: options::OPT_fcs_profile_generate_EQ)) {
|
||||
|
|
|
@ -62,12 +62,16 @@
|
|||
// RUN: %clang_cl /Z7 -### -- %s 2>&1 | FileCheck -check-prefix=gdefcolumn %s
|
||||
// gdefcolumn-NOT: -dwarf-column-info
|
||||
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-generate=/tmp/somefile.profraw -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE %s
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-generate=/tmp/somefile.profraw -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE-FILE %s
|
||||
// CHECK-PROFILE-INSTR-GENERATE: "-fprofile-instrument=clang" "--dependent-lib={{[^"]*}}clang_rt.profile-{{[^"]*}}.lib"
|
||||
// CHECK-PROFILE-INSTR-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw"
|
||||
|
||||
// RUN: %clang_cl -### /FA -fprofile-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s
|
||||
// CHECK-PROFILE-GENERATE: "-fprofile-instrument=llvm" "--dependent-lib={{[^"]*}}clang_rt.profile-{{[^"]*}}.lib"
|
||||
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
||||
// CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" "--dependent-lib={{[^"]*}}clang_rt.profile-{{[^"]*}}.lib"
|
||||
// CHECK-PROFILE-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw"
|
||||
// CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}'
|
||||
|
||||
// RUN: %clang_cl -### /FA -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s
|
||||
|
|
Loading…
Reference in New Issue