Merge pull request #15338 from touilleMan/disable-lto-gdnative-wrapper

[GDnative] Disable lto for gdnative wrapper
This commit is contained in:
Rémi Verschelde 2018-01-04 21:15:02 +01:00 committed by GitHub
commit 1e556173b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,6 +245,14 @@ if ARGUMENTS.get('gdnative_wrapper', False):
gd_wrapper_env = env.Clone() gd_wrapper_env = env.Clone()
gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/']) 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: if not env.msvc:
gd_wrapper_env.Append(CCFLAGS=['-fPIC']) gd_wrapper_env.Append(CCFLAGS=['-fPIC'])