mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:25:40 +00:00
modified tools/rbuild/backend/mingw/compilers/msc.mak
Fix definition of cl Fix definition of RBUILD_CXX modified tools/rbuild/backend/mingw/mingw.cpp modified tools/rbuild/backend/mingw/mingw.h modified tools/rbuild/backend/mingw/mstools_detection.cpp Actually set RBUILD_CL_PATH and RBUILD_LINK_PATH svn path=/trunk/; revision=41370
This commit is contained in:
parent
067ab38bb7
commit
305a63335d
4 changed files with 22 additions and 9 deletions
|
@ -15,7 +15,7 @@ CPPFLAG_UNICODE:=/DUNICODE /D_UNICODE
|
||||||
|
|
||||||
BUILTIN_CPPFLAGS+= /X
|
BUILTIN_CPPFLAGS+= /X
|
||||||
|
|
||||||
cl=$$(Q)$$(RBUILD_HELPER_TARGET) "RBUILD_CL_" "$(notdir $<<)" cl /nologo
|
cl=$(Q)$(RBUILD_HELPER_TARGET) "RBUILD_CL_" "$(notdir $<)" cl /nologo
|
||||||
|
|
||||||
#(module, source, dependencies, cflags, output)
|
#(module, source, dependencies, cflags, output)
|
||||||
#TODO
|
#TODO
|
||||||
|
@ -79,6 +79,8 @@ $(5): $(2) $(3) $$(RBUILD_HELPER_TARGET) | ${call RBUILD_dir,$(5)}
|
||||||
$$(ECHO_CC)
|
$$(ECHO_CC)
|
||||||
$${cl} /TP /Fo$$@ ${call RBUILD_cxxflags,$(1),$(4)} /c $$<
|
$${cl} /TP /Fo$$@ ${call RBUILD_cxxflags,$(1),$(4)} /c $$<
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
#(module, source, dependencies, cflags)
|
#(module, source, dependencies, cflags)
|
||||||
|
|
|
@ -70,6 +70,9 @@ const struct ModuleHandlerInformations ModuleHandlerInformations[] = {
|
||||||
{ HostFalse, "", "", "" }, // MessageHeader
|
{ HostFalse, "", "", "" }, // MessageHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static std::string mscPath;
|
||||||
|
static std::string mslinkPath;
|
||||||
|
|
||||||
string
|
string
|
||||||
MingwBackend::GetFullPath ( const FileLocation& file ) const
|
MingwBackend::GetFullPath ( const FileLocation& file ) const
|
||||||
{
|
{
|
||||||
|
@ -426,6 +429,12 @@ MingwBackend::GenerateGlobalVariables () const
|
||||||
fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)linkers$(SEP)%s.mak\n", ProjectNode.GetLinkerSet ().c_str () );
|
fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)linkers$(SEP)%s.mak\n", ProjectNode.GetLinkerSet ().c_str () );
|
||||||
fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)compilers$(SEP)%s.mak\n", ProjectNode.GetCompilerSet ().c_str () );
|
fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)compilers$(SEP)%s.mak\n", ProjectNode.GetCompilerSet ().c_str () );
|
||||||
|
|
||||||
|
if ( mscPath.length() )
|
||||||
|
fprintf ( fMakefile, "export RBUILD_CL_PATH=%s\n", mscPath.c_str () );
|
||||||
|
|
||||||
|
if ( mslinkPath.length() )
|
||||||
|
fprintf ( fMakefile, "export RBUILD_LINK_PATH=%s\n", mslinkPath.c_str () );
|
||||||
|
|
||||||
if ( configuration.Dependencies == FullDependencies )
|
if ( configuration.Dependencies == FullDependencies )
|
||||||
{
|
{
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
|
@ -762,7 +771,7 @@ MingwBackend::DetectCompiler ()
|
||||||
}
|
}
|
||||||
else if ( ProjectNode.configuration.Compiler == MicrosoftC )
|
else if ( ProjectNode.configuration.Compiler == MicrosoftC )
|
||||||
{
|
{
|
||||||
detectedCompiler = DetectMicrosoftCompiler ( compilerVersion );
|
detectedCompiler = DetectMicrosoftCompiler ( compilerVersion, mscPath );
|
||||||
supportedCompiler = true; // TODO
|
supportedCompiler = true; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1006,7 +1015,7 @@ MingwBackend::DetectBinutils ()
|
||||||
}
|
}
|
||||||
else if ( ProjectNode.configuration.Linker == MicrosoftLink )
|
else if ( ProjectNode.configuration.Linker == MicrosoftLink )
|
||||||
{
|
{
|
||||||
detectedBinutils = DetectMicrosoftLinker ( binutilsVersion );
|
detectedBinutils = DetectMicrosoftLinker ( binutilsVersion, mslinkPath );
|
||||||
supportedBinutils = true; // TODO
|
supportedBinutils = true; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,8 @@ private:
|
||||||
void GenerateDirectoryTargets ();
|
void GenerateDirectoryTargets ();
|
||||||
FILE* fMakefile;
|
FILE* fMakefile;
|
||||||
bool use_pch;
|
bool use_pch;
|
||||||
bool DetectMicrosoftCompiler ( std::string& version );
|
bool DetectMicrosoftCompiler ( std::string& version, std::string& path );
|
||||||
bool DetectMicrosoftLinker ( std::string& version );
|
bool DetectMicrosoftLinker ( std::string& version, std::string& path );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2216,7 +2216,7 @@ void EnumerateMicrosoftTools(const std::string& arch, bool wantCompiler, bool wa
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MingwBackend::DetectMicrosoftCompiler ( std::string& version )
|
MingwBackend::DetectMicrosoftCompiler ( std::string& version, std::string& path )
|
||||||
{
|
{
|
||||||
bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
|
bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
|
||||||
bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
|
bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
|
||||||
|
@ -2234,13 +2234,14 @@ MingwBackend::DetectMicrosoftCompiler ( std::string& version )
|
||||||
std::ostringstream compilerVersion;
|
std::ostringstream compilerVersion;
|
||||||
compilerVersion << msCompilerVersion;
|
compilerVersion << msCompilerVersion;
|
||||||
version = compilerVersion.str();
|
version = compilerVersion.str();
|
||||||
|
path = msCompilerPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MingwBackend::DetectMicrosoftLinker ( std::string& version )
|
MingwBackend::DetectMicrosoftLinker ( std::string& version, std::string& path )
|
||||||
{
|
{
|
||||||
bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
|
bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
|
||||||
bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
|
bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
|
||||||
|
@ -2258,6 +2259,7 @@ MingwBackend::DetectMicrosoftLinker ( std::string& version )
|
||||||
std::ostringstream linkerVersion;
|
std::ostringstream linkerVersion;
|
||||||
linkerVersion << msLinkerVersion;
|
linkerVersion << msLinkerVersion;
|
||||||
version = linkerVersion.str();
|
version = linkerVersion.str();
|
||||||
|
path = msLinkerPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2273,13 +2275,13 @@ MingwBackend::DetectMicrosoftLinker ( std::string& version )
|
||||||
#include "mingw.h"
|
#include "mingw.h"
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MingwBackend::DetectMicrosoftCompiler ( std::string& )
|
MingwBackend::DetectMicrosoftCompiler ( std::string&, std::string& )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MingwBackend::DetectMicrosoftLinker ( std::string& )
|
MingwBackend::DetectMicrosoftLinker ( std::string&, std::string& )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue