<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2c4b13b8b0156162c888ab4fa68101fabd466d4e">https://github.com/macports/macports-ports/commit/2c4b13b8b0156162c888ab4fa68101fabd466d4e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 2c4b13b8b0156162c888ab4fa68101fabd466d4e
</span>Author: Marcus Calhoun-Lopez <marcuscalhounlopez@gmail.com>
AuthorDate: Sat Apr 9 19:16:58 2022 -0700
<span style='display:block; white-space:pre;color:#404040;'> compiler_wrapper PG: whitespace changes
</span>---
_resources/port1.0/group/compiler_wrapper-1.0.tcl | 128 +++++++++++-----------
1 file changed, 64 insertions(+), 64 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/compiler_wrapper-1.0.tcl b/_resources/port1.0/group/compiler_wrapper-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index e3c460368a5..978f7b2e4d6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/compiler_wrapper-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/compiler_wrapper-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -106,77 +106,77 @@ proc compwrap::wrap_compiler {tag} {
</span> return ${comp}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Create the directory for the wrapper.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set wrapdir [file dirname ${wrapcomp}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists ${wrapdir}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d ${wrapdir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create the directory for the wrapper.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set wrapdir [file dirname ${wrapcomp}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists ${wrapdir}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${wrapdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Force recreate in case underlying compiler has changed
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${wrapcomp}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: Creating ${wrapcomp}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # The list of compiler flags to construct
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set comp_opts [list]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Add MP compiler flags ?
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [option compwrap.add_compiler_flags] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # standard options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set flag [compwrap::comp_flags ${tag}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> Comp Flags: Will embed '${flag}' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " ${flag}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # isysroot
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option configure.sdkroot] ne "" && \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ![option compiler.limit_flags] && \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [lsearch -exact [option compwrap.ccache_supported_compilers] ${tag}] >= 0 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set sdk -isysroot[option configure.sdkroot]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> SDK: Will embed '${sdk}' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " ${sdk}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Force recreate in case underlying compiler has changed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${wrapcomp}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: Creating ${wrapcomp}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The list of compiler flags to construct
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set comp_opts [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add MP compiler flags ?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [option compwrap.add_compiler_flags] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # standard options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set flag [compwrap::comp_flags ${tag}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> Comp Flags: Will embed '${flag}' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " ${flag}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # isysroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option configure.sdkroot] ne "" && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ![option compiler.limit_flags] && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [lsearch -exact [option compwrap.ccache_supported_compilers] ${tag}] >= 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk -isysroot[option configure.sdkroot]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> SDK: Will embed '${sdk}' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " ${sdk}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # pipe
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [option configure.pipe] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> Will embed -pipe in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " -pipe"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # pipe
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [option configure.pipe] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> Will embed -pipe in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " -pipe"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add legacy support env vars
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [option compwrap.add_legacysupport_flags] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> Will embed legacysupport flags in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " \$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\}"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Add legacy support env vars
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [option compwrap.add_legacysupport_flags] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> Will embed legacysupport flags in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " \$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Basic option, to pass on all command line arguments
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [llength [option compwrap.compiler_pre_flags]] > 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> Pre Flags: Will embed '[option compwrap.compiler_pre_flags]' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " [join [option compwrap.compiler_pre_flags]]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " \"[join [option compwrap.compiler_args_forward]]\""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [llength [option compwrap.compiler_post_flags]] > 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> Post Flags: Will embed '[option compwrap.compiler_post_flags]' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " [join [option compwrap.compiler_post_flags]]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Basic option, to pass on all command line arguments
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [llength [option compwrap.compiler_pre_flags]] > 0 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> Pre Flags: Will embed '[option compwrap.compiler_pre_flags]' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " [join [option compwrap.compiler_pre_flags]]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " \"[join [option compwrap.compiler_args_forward]]\""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [llength [option compwrap.compiler_post_flags]] > 0 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> Post Flags: Will embed '[option compwrap.compiler_post_flags]' in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append comp_opts " [join [option compwrap.compiler_post_flags]]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Prepend ccache launcher if active
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [compwrap::use_ccache ${tag}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "compiler_wrapper: -> Will use ccache compiler launcher in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set comp "${prefix}/bin/ccache ${comp}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Prepend ccache launcher if active
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [compwrap::use_ccache ${tag}] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "compiler_wrapper: -> Will use ccache compiler launcher in ${tag} wrapper script"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set comp "${prefix}/bin/ccache ${comp}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Finally create the wrapper script
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set f [open ${wrapcomp} w 0755]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${f} "#!/bin/bash"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # If ccache active make sure correct CCACHE_DIR is used as not all build systems
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # (looking at you Bazel) propagate this flag.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [compwrap::use_ccache ${tag}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${f} "export CCACHE_DIR=[compwrap::get_ccache_dir]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option compwrap.print_compiler_command]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${f} "echo ${comp} ${comp_opts}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${f} "exec ${comp} ${comp_opts}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close ${f}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Finally create the wrapper script
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set f [open ${wrapcomp} w 0755]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ${f} "#!/bin/bash"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # If ccache active make sure correct CCACHE_DIR is used as not all build systems
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # (looking at you Bazel) propagate this flag.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [compwrap::use_ccache ${tag}] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ${f} "export CCACHE_DIR=[compwrap::get_ccache_dir]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option compwrap.print_compiler_command]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ${f} "echo ${comp} ${comp_opts}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ${f} "exec ${comp} ${comp_opts}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- close ${f}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> return ${wrapcomp}
}
</pre><pre style='margin:0'>
</pre>