summaryrefslogtreecommitdiff
path: root/compiler/options.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-04-20 18:56:15 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-04-20 18:56:15 +0000
commit031f103a866e3c59d862bc52f83a695ddc182316 (patch)
tree3241dcb111d9ee913ffb6e2ef5709f0648c2ace3 /compiler/options.pas
parent9c20a98419b8a8ca00651bd8e9ad06869386f925 (diff)
downloadfpc-031f103a866e3c59d862bc52f83a695ddc182316.tar.gz
+ support for -CLflto_nosystem option to perform LTO for everything except
for the system unit, as there are several bugs in the Xcode linkers that trigger when the system unit is involved: o Xcode 9.3: the second symbol associated with routines that have multiple symbols (such as FPC_INTERLOCKED*) gets moved to the next routine (so e.g. calling InterlockedIncrement results in calling InterlockedExchange) o Xcode 10.1: the linker does not generate native code for the personality routine (probably because it's not referenced directly anywhere) git-svn-id: https://svn.freepascal.org/svn/fpc/branches/debug_eh@41911 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/options.pas')
-rw-r--r--compiler/options.pas9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/options.pas b/compiler/options.pas
index c6ed0500c7..69ef513984 100644
--- a/compiler/options.pas
+++ b/compiler/options.pas
@@ -1318,6 +1318,15 @@ begin
else
exclude(init_settings.moduleswitches,cs_lto);
end;
+ 'ltonosystem':
+ begin
+ if not disable then
+ begin
+ include(init_settings.globalswitches,cs_lto_nosystem);
+ end
+ else
+ exclude(init_settings.globalswitches,cs_lto_nosystem);
+ end;
else
begin
IllegalPara(opt);