<pre style='margin:0'>
Landon Fuller (landonf) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/13c447288d05e6773ebd98e151ca9d26f49effcd">https://github.com/macports/macports-ports/commit/13c447288d05e6773ebd98e151ca9d26f49effcd</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 13c447288d05e6773ebd98e151ca9d26f49effcd
</span>Author: Landon Fuller <landonf@macports.org>
AuthorDate: Wed Aug 4 11:59:37 2021 -0600
<span style='display:block; white-space:pre;color:#404040;'> vampire: add +(native|polly|profile|debug) variants, and test support
</span>---
math/vampire/Portfile | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/math/vampire/Portfile b/math/vampire/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c9ad00d5977..1cfdbec88a6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/math/vampire/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/math/vampire/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -32,6 +32,48 @@ cmake.generator Ninja
</span>
configure.args -DIPO=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Don't overide vampire's default optimization flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.optflags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant debug description {Enable the debug build configuration} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmake.build_type Debug
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant native description {Generate code optimized for this machine's CPU. The resulting binaries may not run on other processors} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.optflags-append -march=native
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant polly description {Perform loop and data-locality optimization using LLVM's Polly optimizer} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # We need llvm built with polly support; this available by default as of our llvm-12 port,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # so make that our minimum version.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.blacklist-append {cc} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {clang} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {macports-clang-[0-9].*} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {macports-clang-10} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {macports-clang-11} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {*gcc*}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.optflags-append -O3 -mllvm -polly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant profile description {Generate instrumented code that may be used for profile-guided optimization} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Default to /dev/null, requiring that users explicitly set LLVM_PROFILE_FILE.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # See also: https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.optflags-append -fprofile-instr-generate=/dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Require clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.blacklist-append {*gcc*} cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes-append "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${name} has been built with profiling instrumentation enabled; note\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that this will introduce non-negligible runtime overhead.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ To generate profile data, specify an output path by setting the\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LLVM_PROFILE_FILE environmental variable before executing vampire.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> destroot {
xinstall -d -m 755 "${destroot}${cmake.install_prefix}/bin"
xinstall -m 755 "${cmake.build_dir}/bin/vampire" "${destroot}${cmake.install_prefix}/bin/vampire"
</pre><pre style='margin:0'>
</pre>