issue #1161: return status if lib invocation

This commit is contained in:
Rainer Schuetze 2015-10-17 15:27:37 +02:00
parent f7cfa4fb95
commit 8b5cee7a7c
3 changed files with 7 additions and 5 deletions

View file

@ -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;
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View file

@ -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.

View file

@ -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)
{ {