diff --git a/src/ce_dmdwrap.pas b/src/ce_dmdwrap.pas index 9ab24ee0..d55eed36 100644 --- a/src/ce_dmdwrap.pas +++ b/src/ce_dmdwrap.pas @@ -130,6 +130,8 @@ type fRelease: boolean; fAllInst: boolean; fStackStomp: boolean; + fAlwayLinkLibs: boolean; + procedure setAlwaysLinkLibs(const aValue: boolean); procedure setAllInst(const aValue: boolean); procedure setUnittest(const aValue: boolean); procedure setTrgKind(const aValue: TTargetSystem); @@ -143,6 +145,7 @@ type procedure setVerIds(const aValue: TStringList); procedure setStackStomp(const aValue: boolean); published + property alwaysLinkStaticLibs: boolean read fAlwayLinkLibs write setAlwaysLinkLibs default false; property targetKind: TTargetSystem read fTrgKind write setTrgKind default auto; property binaryKind: TBinaryKind read fBinKind write setBinKind default executable; property inlining: boolean read fInline write setInline default false; @@ -611,10 +614,11 @@ begin fBoundsCheck:= src.fBoundsCheck; fOptimz := src.fOptimz; fGenStack := src.fGenStack; - fAddMain := src.fAddMain; + fAddMain := src.fAddMain; fRelease := src.fRelease; fAllinst := src.fAllInst; fStackStomp := src.fStackStomp; + fAlwayLinkLibs := src.fAlwayLinkLibs; end else inherited; end; @@ -633,6 +637,13 @@ begin doChanged; end; +procedure TOutputOpts.setAlwaysLinkLibs(const aValue: boolean); +begin + if fAlwayLinkLibs = aValue then exit; + fAlwayLinkLibs := aValue; + doChanged; +end; + procedure TOutputOpts.setVerIds(const aValue: TStringList); begin fVerIds.Assign(aValue); diff --git a/src/ce_nativeproject.pas b/src/ce_nativeproject.pas index 32939081..7bb3860a 100644 --- a/src/ce_nativeproject.pas +++ b/src/ce_nativeproject.pas @@ -374,9 +374,10 @@ begin {$IFDEF WINDOWS} // only link lib file if executable/shared lib // OS switch: read more @ http://forum.dlang.org/post/ooekdkwrefposmchekrp@forum.dlang.org - if currentConfiguration.outputOptions.binaryKind in [executable, sharedlib] then + if (currentConfiguration.outputOptions.binaryKind in [executable, sharedlib]) or + currentConfiguration.outputOptions.alwaysLinkStaticLibs then {$ENDIF} - LibMan.getLibFiles(libAliasesPtr, aList); + LibMan.getLibFiles(libAliasesPtr, aList); // but always adds -I LibMan.getLibSources(libAliasesPtr, aList); diff --git a/wiki/wiki.todo.txt b/wiki/wiki.todo.txt index a612e79d..7b3e954c 100644 --- a/wiki/wiki.todo.txt +++ b/wiki/wiki.todo.txt @@ -1,2 +1,3 @@ - setup: screenshots. -- small paragraph about docking, docking options & known issues. \ No newline at end of file +- small paragraph about docking, docking options & known issues. +- project, output options, screenshot is outdated. \ No newline at end of file diff --git a/wiki/wiki.txt b/wiki/wiki.txt index 0c11236f..8b64833d 100644 --- a/wiki/wiki.txt +++ b/wiki/wiki.txt @@ -595,6 +595,7 @@ These options are defined per-configuration. ![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/projconf.output1.png) - addMain: adds an empty _main()_ procedure. (**-main**) +- alwaysLinkStaticLibs: under Windows this option forces to link a static library selected in the _LibraryAliases_ even if not required (for example if the project is itself a static library). - binaryKind: sets the compiler output kind among: **"staticlib"**, **"sharedlib"**, **"executable"** and **"object"**. (it matches respectively to **-lib**, **-shared**, nothing, **-c**). - boundsCheck: sets the bounds checking mode, among **"alwaysON"**, **"alwaysOFF"** and **"safeOnly"**. (**-boundscheck=on** or **-boundscheck=off** or **-boundscheck=safeonly**). The switch is not generated when it's a default value. - generateStackFrame: forces the generation of stack frames. (**-gs**)