mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 03:16:05 +03:00
Fixed #21 — Added -lib switch
This commit is contained in:
parent
859ae8481f
commit
fdead0d154
8 changed files with 137 additions and 18 deletions
|
@ -388,7 +388,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
// only link if possible
|
||||
if (!global.params.obj || !global.params.output_o)
|
||||
if (!global.params.obj || !global.params.output_o || createStaticLib)
|
||||
global.params.link = 0;
|
||||
|
||||
if (global.params.link)
|
||||
|
@ -1028,11 +1028,15 @@ LDC_TARGETS
|
|||
{
|
||||
if (global.params.link)
|
||||
error("no object files to link");
|
||||
else if (createStaticLib)
|
||||
error("no object files");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (global.params.link)
|
||||
status = linkObjToExecutable(global.params.argv0);
|
||||
else if (createStaticLib)
|
||||
createStaticLibrary();
|
||||
|
||||
if (global.params.run)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue