mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 11:53:13 +01:00
First import of dmd-2.065-b1 (7088593).
The CPP mangling is not integrated yet.
This commit is contained in:
@@ -70,7 +70,7 @@ static std::string getOutputName(bool const sharedLib)
|
||||
if (Module::rootModule)
|
||||
result = Module::rootModule->toChars();
|
||||
else if (global.params.objfiles->dim)
|
||||
result = FileName::removeExt(static_cast<char*>(global.params.objfiles->data[0]));
|
||||
result = FileName::removeExt(static_cast<const char*>(global.params.objfiles->data[0]));
|
||||
else
|
||||
result = "a.out";
|
||||
|
||||
@@ -110,14 +110,14 @@ static int linkObjToBinaryGcc(bool sharedLib)
|
||||
// object files
|
||||
for (unsigned i = 0; i < global.params.objfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.objfiles->data[i]);
|
||||
const char *p = static_cast<const char *>(global.params.objfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
// user libs
|
||||
for (unsigned i = 0; i < global.params.libfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.libfiles->data[i]);
|
||||
const char *p = static_cast<const char *>(global.params.libfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ static int linkObjToBinaryGcc(bool sharedLib)
|
||||
// additional linker switches
|
||||
for (unsigned i = 0; i < global.params.linkswitches->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.linkswitches->data[i]);
|
||||
const char *p = static_cast<const char *>(global.params.linkswitches->data[i]);
|
||||
// Don't push -l and -L switches using -Xlinker, but pass them directly
|
||||
// to GCC. This makes sure user-defined paths take precedence over
|
||||
// GCC's builtin LIBRARY_PATHs.
|
||||
@@ -279,14 +279,14 @@ static int linkObjToBinaryWin(bool sharedLib)
|
||||
// object files
|
||||
for (unsigned i = 0; i < global.params.objfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.objfiles->data[i]);
|
||||
const char *p = static_cast<const char *>(global.params.objfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
// user libs
|
||||
for (unsigned i = 0; i < global.params.libfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.libfiles->data[i]);
|
||||
const char *p = static_cast<const char *>(global.params.libfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ static int linkObjToBinaryWin(bool sharedLib)
|
||||
{
|
||||
static const std::string LIBPATH("-L");
|
||||
static const std::string LIB("-l");
|
||||
std::string str(static_cast<char *>(global.params.linkswitches->data[i]));
|
||||
std::string str(static_cast<const char *>(global.params.linkswitches->data[i]));
|
||||
if (str.length() > 2)
|
||||
{
|
||||
if (std::equal(LIBPATH.begin(), LIBPATH.end(), str.begin()))
|
||||
@@ -386,7 +386,7 @@ void createStaticLibrary()
|
||||
if (Module::rootModule)
|
||||
libName = Module::rootModule->toChars();
|
||||
else if (global.params.objfiles->dim)
|
||||
libName = FileName::removeExt(static_cast<char*>(global.params.objfiles->data[0]));
|
||||
libName = FileName::removeExt(static_cast<const char*>(global.params.objfiles->data[0]));
|
||||
else
|
||||
libName = "a.out";
|
||||
}
|
||||
@@ -406,7 +406,7 @@ void createStaticLibrary()
|
||||
// object files
|
||||
for (unsigned i = 0; i < global.params.objfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.objfiles->data[i]);
|
||||
const char *p = static_cast<const char *>(global.params.objfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user