Skip to content

Commit

Permalink
compiler_wrapper PG: Fix argument quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
cjones051073 committed May 24, 2021
1 parent da19e18 commit 0d92bde
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions _resources/port1.0/group/compiler_wrapper-1.0.tcl
Expand Up @@ -145,7 +145,7 @@ proc compwrap::wrap_compiler {tag} {

# Basic option, to pass on all command line arguments
append comp_opts " [join [option compwrap.compiler_pre_flags]]"
append comp_opts " [join [option compwrap.compiler_args_forward]]"
append comp_opts " \"[join [option compwrap.compiler_args_forward]]\""
append comp_opts " [join [option compwrap.compiler_post_flags]]"

# Prepend ccache launcher if active
Expand All @@ -162,11 +162,10 @@ proc compwrap::wrap_compiler {tag} {
if { [compwrap::use_ccache ${tag}] } {
puts ${f} "export CCACHE_DIR=[compwrap::get_ccache_dir]"
}
puts ${f} "CMD=\"${comp} ${comp_opts}\""
if {[option compwrap.print_compiler_command]} {
puts ${f} "echo \${CMD}"
puts ${f} "echo ${comp} ${comp_opts}"
}
puts ${f} "exec \${CMD}"
puts ${f} "exec ${comp} ${comp_opts}"
close ${f}

return ${wrapcomp}
Expand Down

4 comments on commit 0d92bde

@mascguy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geez Josh, breaking things again... ;-)

@jmroot
Copy link
Member

@jmroot jmroot commented on 0d92bde May 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR, a wrapper generated by 503474f (the commit before 97af063) looks like this:

#!/bin/bash
CMD="/usr/bin/clang -pipe -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk ${MACPORTS_LEGACY_SUPPORT_CPPFLAGS}   ${@} "
exec ${CMD}

@cjones051073
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right my mistake, a different commit caused the problem. apologies for blaming the wrong one.

@jmroot
Copy link
Member

@jmroot jmroot commented on 0d92bde May 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also closes #62873?

Please sign in to comment.