summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2017-02-13 09:57:50 +0000
committerwhitequark <whitequark@whitequark.org>2017-05-01 09:16:20 +0000
commit42754ce710a777b38402b12728daf54d68ea2b50 (patch)
tree471e30da0626a6b7b2182799280742ba11466ac6 /configure
parentAuto merge of #41651 - arielb1:missing-adjustment-2, r=eddyb (diff)
downloadgrust-42754ce710a777b38402b12728daf54d68ea2b50.tar.gz
grust-42754ce710a777b38402b12728daf54d68ea2b50.tar.bz2
grust-42754ce710a777b38402b12728daf54d68ea2b50.tar.xz
Add profiling support, through the rustc -Z profile flag.
When -Z profile is passed, the GCDAProfiling LLVM pass is added to the pipeline, which uses debug information to instrument the IR. After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno file is created, containing initial profiling information. After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda file is created, containing branch counters. The created *.gcno and *.gcda files can be processed using the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM generates does not faithfully follow the GCC's format for *.gcno and *.gcda files, and so it will probably not work with other tools (such as gcov itself) that consume these files.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure b/configure
index c5ecc22368..ced7377a23 100755
--- a/configure
+++ b/configure
@@ -452,6 +452,7 @@ opt vendor 0 "enable usage of vendored Rust crates"
452opt sanitizers 0 "build the sanitizer runtimes (asan, lsan, msan, tsan)" 452opt sanitizers 0 "build the sanitizer runtimes (asan, lsan, msan, tsan)"
453opt dist-src 1 "when building tarballs enables building a source tarball" 453opt dist-src 1 "when building tarballs enables building a source tarball"
454opt cargo-openssl-static 0 "static openssl in cargo" 454opt cargo-openssl-static 0 "static openssl in cargo"
455opt profiler 0 "build the profiler runtime"
455 456
456# Optimization and debugging options. These may be overridden by the release channel, etc. 457# Optimization and debugging options. These may be overridden by the release channel, etc.
457opt_nosave optimize 1 "build optimized rust code" 458opt_nosave optimize 1 "build optimized rust code"