From 6e3d78c94c6ba0e872f37018276923158c621ba3 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Sat, 25 Nov 2017 20:26:42 +0100 Subject: [PATCH] [GDNative] disable -fPIC flag with msvc compiler --- modules/gdnative/SCsub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub index 54d0672a5bd..f5a593cf4ea 100644 --- a/modules/gdnative/SCsub +++ b/modules/gdnative/SCsub @@ -245,7 +245,7 @@ if ARGUMENTS.get('gdnative_wrapper', False): gd_wrapper_env = env.Clone() gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/']) - # I think this doesn't work on MSVC yet... - gd_wrapper_env.Append(CCFLAGS=['-fPIC']) + if not env.msvc: + gd_wrapper_env.Append(CCFLAGS=['-fPIC']) gd_wrapper_env.Library("#bin/gdnative_wrapper_code", [gensource])