mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
Add a check to not mix up host and target modules
Should probably be moved later outside of backend directory svn path=/trunk/; revision=38549
This commit is contained in:
parent
bdbc81f185
commit
7b50d4352c
1 changed files with 16 additions and 0 deletions
|
@ -778,6 +778,22 @@ MingwModuleHandler::GenerateMacros (
|
||||||
|
|
||||||
if ( data.libraries.size () > 0 )
|
if ( data.libraries.size () > 0 )
|
||||||
{
|
{
|
||||||
|
// Check if host and target modules are not mixed up
|
||||||
|
HostType current = ModuleHandlerInformations[module.type].DefaultHost;
|
||||||
|
std::vector<Library*>::const_iterator it;
|
||||||
|
for ( it = data.libraries.begin(); it != data.libraries.end(); ++it )
|
||||||
|
{
|
||||||
|
HostType imported = ModuleHandlerInformations[(*it)->importedModule->type].DefaultHost;
|
||||||
|
if (current != imported)
|
||||||
|
{
|
||||||
|
throw InvalidOperationException ( __FILE__,
|
||||||
|
__LINE__,
|
||||||
|
"Module '%s' imports module '%s', which is not of the right type",
|
||||||
|
module.name.c_str (),
|
||||||
|
(*it)->importedModule->name.c_str () );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string deps = GenerateImportLibraryDependenciesFromVector ( data.libraries );
|
string deps = GenerateImportLibraryDependenciesFromVector ( data.libraries );
|
||||||
if ( deps.size () > 0 )
|
if ( deps.size () > 0 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue