diff options
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2018-01-04 19:42:02 +0100 |
---|---|---|
committer | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2018-01-04 20:29:47 +0100 |
commit | c1eba93caea8b6e047237a883452b2adb363ce00 (patch) | |
tree | 125976ec07c64f3bc5a94d4519fbab11a014730c /modules/gdnative | |
parent | d78335d87f4441c2bbe7e1c11642fbf19ae95c12 (diff) |
Disable lto for gdnative wrapper
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/SCsub | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub index 4e73ebfb9d..c92c3f30a2 100644 --- a/modules/gdnative/SCsub +++ b/modules/gdnative/SCsub @@ -245,6 +245,14 @@ if ARGUMENTS.get('gdnative_wrapper', False): gd_wrapper_env = env.Clone() gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/']) + if gd_wrapper_env['use_lto']: + if not env.msvc: + gd_wrapper_env.Append(CCFLAGS=['--no-lto']) + gd_wrapper_env.Append(LINKFLAGS=['--no-lto']) + else: + gd_wrapper_env.Append(CCFLAGS=['/GL-']) + gd_wrapper_env.Append(LINKFLAGS=['/LTCG:OFF']) + if not env.msvc: gd_wrapper_env.Append(CCFLAGS=['-fPIC']) |