From 0ddc7acf6e9d088bbca043720c37c46d07f2e5bb Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 21 Jan 2016 18:08:06 +0100 Subject: [PATCH] linux version, CE projs, fPIC added when outputKind is sharedLib + hide allInst switch --- src/ce_dmdwrap.pas | 21 ++++++++++++++++++++- src/ce_projconf.pas | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/ce_dmdwrap.pas b/src/ce_dmdwrap.pas index b3a86ba3..813cf5b7 100644 --- a/src/ce_dmdwrap.pas +++ b/src/ce_dmdwrap.pas @@ -614,6 +614,10 @@ begin begin str := binKindStr[fBinKind]; if str.isNotEmpty then aList.Add(str); + {$IFDEF UNIX} + if fBinKind = sharedlib then + aList.Add('-fPIC'); + {$ENDIF} str := trgKindStr[fTrgKind]; if str.isNotEmpty then aList.Add(str); if fUnittest then aList.Add('-unittest'); @@ -640,7 +644,22 @@ begin baseopt := TOutputOpts(base); str := binKindStr[fBinKind]; strbase := binKindStr[baseopt.fBinKind]; - if (str <> strbase) then aList.Add(str) else aList.Add(strbase); + if (str <> strbase) then + begin + aList.Add(str); + {$IFDEF UNIX} + if fBinKind = sharedlib then + aList.Add('-fPIC'); + {$ENDIF} + end + else + begin + aList.Add(strbase); + {$IFDEF UNIX} + if baseopt.fBinKind = sharedlib then + aList.Add('-fPIC'); + {$ENDIF} + end; str := trgKindStr[fTrgKind]; strbase := trgKindStr[baseopt.fTrgKind]; if (str <> strbase) then aList.Add(str) else aList.Add(strbase); diff --git a/src/ce_projconf.pas b/src/ce_projconf.pas index 18f12a44..888c383e 100644 --- a/src/ce_projconf.pas +++ b/src/ce_projconf.pas @@ -348,8 +348,12 @@ begin aShow := false; end; if getGridTarget = fProj.currentConfiguration.outputOptions then + begin if aEditor.GetName = 'noBoundsCheck' then + aShow := false + else if aEditor.GetName = 'generateAllTmpCode' then aShow := false; + end; if getGridTarget = fProj.currentConfiguration.debugingOptions then begin if aEditor.GetName = 'addCInformations' then