McuSupport: Only expand variables from the same target

There are multiple packages in different targets that share the same
variable name (eg. QUL_BOARD_SDK_DIR). Registering all packages into the
same macro expander will make these packages overwrite the variables from
other packages.
The macro expander should only use packages included in a specific target
to expand values from (plus the global ones).

Change-Id: Ia2568696a54e48e4e77f81a9bb1a844f2910bb8d
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Rainer Keller
2022-10-31 09:27:11 +01:00
parent e558fc4d1f
commit 2da68d4108
2 changed files with 9 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ public:
Packages packages;
void expandVariables();
MacroExpanderPtr getMacroExpander();
MacroExpanderPtr getMacroExpander(const McuTarget &target);
static Macros *globalMacros();
};