From 5be546e97fd377e30b4b0870a7db0da58eb2b90d Mon Sep 17 00:00:00 2001 From: Cyano Hao Date: Tue, 19 Mar 2024 20:09:47 +0800 Subject: [PATCH] fix custom link options parsing (#291) --- RedPandaIDE/compiler/compiler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RedPandaIDE/compiler/compiler.cpp b/RedPandaIDE/compiler/compiler.cpp index 44ec4b0f..d3566b07 100644 --- a/RedPandaIDE/compiler/compiler.cpp +++ b/RedPandaIDE/compiler/compiler.cpp @@ -590,11 +590,12 @@ QStringList Compiler::getLibraryArguments(FileType fileType) // Add global compiler linker extras if (compilerSet()->useCustomLinkParams() && !compilerSet()->customLinkParams().isEmpty()) { - QStringList params = textToLines(compilerSet()->customLinkParams()); - if (!params.isEmpty()) { + QMap macros = devCppMacroVariables(); + QStringList params = parseArguments(compilerSet()->customLinkParams(), macros, true); + if (!params.isEmpty()) { foreach(const QString& param, params) result << param; - } + } } if (mProject) {