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:
KJK::Hyperion 2009-06-10 18:24:33 +00:00
parent 067ab38bb7
commit 305a63335d
4 changed files with 22 additions and 9 deletions

View file

@ -15,7 +15,7 @@ CPPFLAG_UNICODE:=/DUNICODE /D_UNICODE
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)
#TODO
@ -79,6 +79,8 @@ $(5): $(2) $(3) $$(RBUILD_HELPER_TARGET) | ${call RBUILD_dir,$(5)}
$$(ECHO_CC)
$${cl} /TP /Fo$$@ ${call RBUILD_cxxflags,$(1),$(4)} /c $$<
endif
endef
#(module, source, dependencies, cflags)

View file

@ -70,6 +70,9 @@ const struct ModuleHandlerInformations ModuleHandlerInformations[] = {
{ HostFalse, "", "", "" }, // MessageHeader
};
static std::string mscPath;
static std::string mslinkPath;
string
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)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 )
{
fprintf ( fMakefile,
@ -762,7 +771,7 @@ MingwBackend::DetectCompiler ()
}
else if ( ProjectNode.configuration.Compiler == MicrosoftC )
{
detectedCompiler = DetectMicrosoftCompiler ( compilerVersion );
detectedCompiler = DetectMicrosoftCompiler ( compilerVersion, mscPath );
supportedCompiler = true; // TODO
}
@ -1006,7 +1015,7 @@ MingwBackend::DetectBinutils ()
}
else if ( ProjectNode.configuration.Linker == MicrosoftLink )
{
detectedBinutils = DetectMicrosoftLinker ( binutilsVersion );
detectedBinutils = DetectMicrosoftLinker ( binutilsVersion, mslinkPath );
supportedBinutils = true; // TODO
}

View file

@ -117,8 +117,8 @@ private:
void GenerateDirectoryTargets ();
FILE* fMakefile;
bool use_pch;
bool DetectMicrosoftCompiler ( std::string& version );
bool DetectMicrosoftLinker ( std::string& version );
bool DetectMicrosoftCompiler ( std::string& version, std::string& path );
bool DetectMicrosoftLinker ( std::string& version, std::string& path );
};

View file

@ -2216,7 +2216,7 @@ void EnumerateMicrosoftTools(const std::string& arch, bool wantCompiler, bool wa
}
bool
MingwBackend::DetectMicrosoftCompiler ( std::string& version )
MingwBackend::DetectMicrosoftCompiler ( std::string& version, std::string& path )
{
bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
@ -2234,13 +2234,14 @@ MingwBackend::DetectMicrosoftCompiler ( std::string& version )
std::ostringstream compilerVersion;
compilerVersion << msCompilerVersion;
version = compilerVersion.str();
path = msCompilerPath;
}
return ret;
}
bool
MingwBackend::DetectMicrosoftLinker ( std::string& version )
MingwBackend::DetectMicrosoftLinker ( std::string& version, std::string& path )
{
bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
@ -2258,6 +2259,7 @@ MingwBackend::DetectMicrosoftLinker ( std::string& version )
std::ostringstream linkerVersion;
linkerVersion << msLinkerVersion;
version = linkerVersion.str();
path = msLinkerPath;
}
return ret;
@ -2273,13 +2275,13 @@ MingwBackend::DetectMicrosoftLinker ( std::string& version )
#include "mingw.h"
bool
MingwBackend::DetectMicrosoftCompiler ( std::string& )
MingwBackend::DetectMicrosoftCompiler ( std::string&, std::string& )
{
return false;
}
bool
MingwBackend::DetectMicrosoftLinker ( std::string& )
MingwBackend::DetectMicrosoftLinker ( std::string&, std::string& )
{
return false;
}