Skip to content

Commit

Permalink
- update to MinGW gcc 4.4 (use -static-libgcc to not require addition…
Browse files Browse the repository at this point in the history
…al gcc .dlls)

- SCodeUtil: check for duplicates separately in absyn and loaded builtin functions (to allow MDT to load 
  the builtin files without issues).

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9839 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Sep 16, 2011
1 parent d5cbf06 commit 7182898
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
33 changes: 21 additions & 12 deletions Compiler/FrontEnd/SCodeUtil.mo
Expand Up @@ -75,7 +75,7 @@ public function translateAbsyn2SCode
algorithm
outProgram := match(inProgram)
local
SCode.Program sp;
SCode.Program spInitial, spAbsyn, sp;
InstanceHierarchy.InstanceHierarchy ih;
Boolean hasExpandableConnectors;
list<Absyn.Class> inClasses,initialClasses;
Expand All @@ -96,18 +96,27 @@ algorithm
System.setHasExpandableConnectors(false);
// set the external flag that signals the presence of expandable connectors in the model
System.setHasStreamConnectors(false);
sp = Util.listFold(initialClasses, translate2, {});
// call flatten program on the initial classes only
sp = SCodeFlatten.flattenCompleteProgram(sp);
// translate given absyn to scode.
sp = Util.listFold(inClasses, translate2, sp);
sp = listReverse(sp);
SCodeCheck.checkDuplicateClasses(sp);

//print(Util.stringDelimitList(Util.listMap(sp, SCodeDump.printClassStr), "\n"));
// retrieve the expandable connector presence external flag
// hasExpandableConnectors = System.getHasExpandableConnectors();
// (ih, sp) = ExpandableConnectors.elaborateExpandableConnectors(sp, hasExpandableConnectors);
// translate builtin functions
spInitial = Util.listFold(initialClasses, translate2, {});
// call flatten program on the initial classes only
spInitial = SCodeFlatten.flattenCompleteProgram(spInitial);
spInitial = listReverse(spInitial);

// translate given absyn to scode.
spAbsyn = Util.listFold(inClasses, translate2, {});
spAbsyn = listReverse(spAbsyn);

// NOTE: we check duplicates separately for builtin
// and for absyn to allow duplicates of
// ModelicaBuiltin.mo and MetaModelicaBuiltin.mo

// check duplicates in builtin (initial) functions
SCodeCheck.checkDuplicateClasses(spInitial);
// check duplicates in absyn
SCodeCheck.checkDuplicateClasses(spAbsyn);

sp = listAppend(spInitial, spAbsyn);
then
sp;
end match;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/runtime/config.h
Expand Up @@ -50,7 +50,7 @@
#define CONFIGURE_COMMANDLINE "Manually created Makefiles for Visual Studio"
#endif

#define LDFLAGS_SENDDATA " -lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32"
#define LDFLAGS_SENDDATA " -static-libgcc -lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32"
#define CONFIG_WITH_SENDDATA 1
#define CONFIG_EXE_EXT ".exe"
#define CONFIG_DLL_EXT ".dll"
Expand Down

0 comments on commit 7182898

Please sign in to comment.