mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 19:36:06 +03:00
issue #1161: return status if lib invocation
This commit is contained in:
parent
f7cfa4fb95
commit
8b5cee7a7c
3 changed files with 7 additions and 5 deletions
|
@ -431,7 +431,7 @@ int linkObjToBinary(bool sharedLib)
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void createStaticLibrary()
|
int createStaticLibrary()
|
||||||
{
|
{
|
||||||
Logger::println("*** Creating static library ***");
|
Logger::println("*** Creating static library ***");
|
||||||
|
|
||||||
|
@ -501,7 +501,8 @@ void createStaticLibrary()
|
||||||
CreateDirectoryOnDisk(libName);
|
CreateDirectoryOnDisk(libName);
|
||||||
|
|
||||||
// try to call archiver
|
// try to call archiver
|
||||||
executeToolAndWait(tool, args, global.params.verbose);
|
int rc = executeToolAndWait(tool, args, global.params.verbose);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -23,8 +23,9 @@ int linkObjToBinary(bool sharedLib);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a static library from object files.
|
* Create a static library from object files.
|
||||||
*/
|
* @return 0 on success.
|
||||||
void createStaticLibrary();
|
*/
|
||||||
|
int createStaticLibrary();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the executable that was previously linked with linkObjToBinary.
|
* Delete the executable that was previously linked with linkObjToBinary.
|
||||||
|
|
|
@ -1347,7 +1347,7 @@ int main(int argc, char **argv)
|
||||||
if (global.params.link)
|
if (global.params.link)
|
||||||
status = linkObjToBinary(createSharedLib);
|
status = linkObjToBinary(createSharedLib);
|
||||||
else if (createStaticLib)
|
else if (createStaticLib)
|
||||||
createStaticLibrary();
|
status = createStaticLibrary();
|
||||||
|
|
||||||
if (global.params.run && status == EXIT_SUCCESS)
|
if (global.params.run && status == EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue