For PR514:

* language specification files are no longer configured with "configure"
* add substitutions for %bindir%, %libdir%, and various llvmgcc related
  variables needed in the c and cpp spec files.
* Implement the stubstituions in the Compiler Driver.
* Move st.in to projects/Stacker/tools/stkrc where it belongs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22128 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2005-05-19 00:52:28 +00:00
parent 8f9e21e3de
commit cc97cfc43e
9 changed files with 131 additions and 67 deletions
+33 -1
View File
@@ -249,6 +249,14 @@ private:
} else
found = false;
break;
case 'b':
if (*PI == "%bindir%") {
std::string tmp(*PI);
tmp.replace(0,8,LLVM_BINDIR);
action->args.push_back(tmp);
} else
found = false;
break;
case 'd':
if (*PI == "%defs%") {
StringVector::iterator I = Defines.begin();
@@ -282,13 +290,35 @@ private:
found = false;
break;
case 'l':
if (*PI == "%libs%") {
if ((*PI)[1] == 'l') {
std::string tmp(*PI);
if (*PI == "%llvmgccdir%")
tmp.replace(0,12,LLVMGCCDIR);
else if (*PI == "%llvmgccarch%")
tmp.replace(0,13,LLVMGCCARCH);
else if (*PI == "%llvmgcc%")
tmp.replace(0,9,LLVMGCC);
else if (*PI == "%llvmgxx%")
tmp.replace(0,9,LLVMGXX);
else if (*PI == "%llvmcc1%")
tmp.replace(0,9,LLVMCC1);
else if (*PI == "%llvmcc1plus%")
tmp.replace(0,9,LLVMCC1);
else
found = false;
if (found)
action->args.push_back(tmp);
} else if (*PI == "%libs%") {
PathVector::iterator I = LibraryPaths.begin();
PathVector::iterator E = LibraryPaths.end();
while (I != E) {
action->args.push_back( std::string("-L") + I->toString() );
++I;
}
} else if (*PI == "%libdir%") {
std::string tmp(*PI);
tmp.replace(0,8,LLVM_LIBDIR);
action->args.push_back(tmp);
} else
found = false;
break;
@@ -896,6 +926,8 @@ private:
CompilerDriver::~CompilerDriver() {
}
CompilerDriver::ConfigDataProvider::~ConfigDataProvider() {}
CompilerDriver*
CompilerDriver::Get(ConfigDataProvider& CDP) {
return new CompilerDriverImpl(CDP);