Skip to content

Commit 282dec1

Browse files
committed
Set counters using LLVM CLI flags
1 parent 71c2376 commit 282dec1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/llvm.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,10 @@ impl Step for Llvm {
342342
cfg.define("LLVM_BUILD_INSTRUMENTED", "IR");
343343
if let Ok(llvm_profile_dir) = std::env::var("LLVM_PROFILE_DIR") {
344344
cfg.define("LLVM_PROFILE_DATA_DIR", llvm_profile_dir);
345+
cxxflags.push("-mllvm");
346+
cxxflags.push("-vp-counters-per-site=10");
345347
}
346348
}
347-
cfg.define("LLVM_VP_COUNTERS_PER_SITE", "10");
348349
cfg.define("LLVM_BUILD_RUNTIME", "No");
349350
}
350351
if let Some(path) = builder.config.llvm_profile_use.as_ref() {

0 commit comments

Comments
 (0)