Explorar o código

gh-2576 Output debug settings (-f values) to archive

eclcc would read options from an archive, but did not output them
when creating archives.

This fix completes the circle.

Fixes gh-2576.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=13) %!d(string=hai) anos
pai
achega
1acc47f443
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      ecl/eclcc/eclcc.cpp

+ 13 - 0
ecl/eclcc/eclcc.cpp

@@ -1165,6 +1165,19 @@ void EclCC::generateOutput(EclCompileInstance & instance)
         }
         else
         {
+            // Output option settings
+            instance.wu->getDebugValues();
+            Owned<IStringIterator> debugValues = &instance.wu->getDebugValues();
+            ForEach (*debugValues)
+            {
+                SCMStringBuffer debugStr, valueStr;
+                debugValues->str(debugStr);
+                instance.wu->getDebugValue(debugStr.str(), valueStr);
+                Owned<IPropertyTree> option = createPTree("Option");
+                option->setProp("@name", debugStr.str());
+                option->setProp("@value", valueStr.str());
+                instance.archive->addPropTree("Option", option.getClear());
+            }
             if (optManifestFilename)
                 addManifestResourcesToArchive(instance.archive, optManifestFilename);