Ok, i tested it (somehow*) extensively
diff --git a/src/plugins/compilergcc/compilergcc.cpp b/src/plugins/compilergcc/compilergcc.cpp
index 28f3dd1c0..30540db5c 100644
--- a/src/plugins/compilergcc/compilergcc.cpp
+++ b/src/plugins/compilergcc/compilergcc.cpp
@@ -2015,7 +2015,7 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
m_pProject->SetCurrentlyCompilingTarget(0);
return -1;
}
-
+ Manager::Get()->GetMacrosManager()->ReplaceEnvVars(hostapStr);
command << hostapStr << strSPACE;
command << target->GetExecutionParameters();
}
@@ -2028,6 +2028,8 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
// here is last \"
if (commandIsQuoted)
command << strQUOTE;
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
+ Manager::Get()->GetMacrosManager()->ReplaceEnvVars(command);
}
else
{
@@ -2040,8 +2042,10 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
}
command << hostapStr << strSPACE;
command << target->GetExecutionParameters();
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
+ Manager::Get()->GetMacrosManager()->ReplaceEnvVars(command);
}
- Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
+
wxString script = command;
if (platform::macosx)
this patch removes code/ execution duplication and fixes the ticket by enabling macro expansion for shared libraries
i could not trigger any bug i had in mind, i also performed a forum search, but could not find any report about this...
if there are no objections i would apply this patch in the next days
* it is quite difficult to think about any possibility this complex code is called. I have tried all normal ways i could think of to trigger the related code portions. To find out if this breaks some obscure workflow we probably have to wait for complains after the patch is applied... obligatory xkcd:
https://xkcd.com/1172/