summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-04-30 12:59:08 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2018-04-30 12:59:08 +0200
commitcee5117d3b1cc3ea54dee51e67d1e33e4577cdde (patch)
tree741a2f184bf3b15e7aaa39eeeca54fb6eb92f9a2 /modules
parent6244b9e2e1a7e675452fd574b5007dd25ec73c69 (diff)
Fix lto builds on clang compilers
The --no-lto option only works on GCC compilers. This breaks LTO builds on MacOS and iPhone when building the gdnative wrappers. -fno-lto works on both brands of compilers.
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/SCsub4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index acfb83bc10..8654ef3d82 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -275,8 +275,8 @@ if ARGUMENTS.get('gdnative_wrapper', False):
if gd_wrapper_env['use_lto']:
if not env.msvc:
- gd_wrapper_env.Append(CCFLAGS=['--no-lto'])
- gd_wrapper_env.Append(LINKFLAGS=['--no-lto'])
+ gd_wrapper_env.Append(CCFLAGS=['-fno-lto'])
+ gd_wrapper_env.Append(LINKFLAGS=['-fno-lto'])
else:
gd_wrapper_env.Append(CCFLAGS=['/GL-'])
gd_wrapper_env.Append(LINKFLAGS=['/LTCG:OFF'])