[profile] runtime counter relocation needed on all windows targets (#127858)
See PR comments for the discussion that led to this commit.
This commit is contained in:
@@ -762,8 +762,7 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
|
||||
else {
|
||||
CmdArgs.push_back("-fprofile-continuous");
|
||||
// Platforms that require a bias variable:
|
||||
if (T.isOSBinFormatELF() || T.isOSAIX() ||
|
||||
T.isKnownWindowsMSVCEnvironment()) {
|
||||
if (T.isOSBinFormatELF() || T.isOSAIX() || T.isOSWindows()) {
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-runtime-counter-relocation");
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// RUN: %clang --target=powerpc64-ibm-aix -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
|
||||
// RUN: %clang --target=x86_64-unknown-fuchsia -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
|
||||
// RUN: %clang --target=x86_64-windows-msvc -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
|
||||
// RUN: %clang --target=x86_64-windows-gnu -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
|
||||
// RELOC: "-cc1" {{.*}} "-fprofile-continuous" "-mllvm" "-runtime-counter-relocation"
|
||||
|
||||
// 2) test -fprofile-continuous with cs-profile-generate and -fprofile-instr-generate
|
||||
|
||||
Reference in New Issue
Block a user