diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-01-04 21:15:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 21:15:02 +0100 |
commit | 1e556173b57ac2d74dae5af2d81d79e25593e266 (patch) | |
tree | f9927fa18e8aab362e376f86351eb1fb39d63812 | |
parent | 1b79326c0f06fec2a390a57607ef56ce8e6bd5b5 (diff) | |
parent | c1eba93caea8b6e047237a883452b2adb363ce00 (diff) |
Merge pull request #15338 from touilleMan/disable-lto-gdnative-wrapper
[GDnative] Disable lto for gdnative wrapper
-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']) |