From 602b9da9928e10b55489d2a5c9599107b32dc90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Mon, 27 Oct 2014 16:47:47 -0400 Subject: add -fPIC for static libraries --- gyp/common.gypi | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gyp') diff --git a/gyp/common.gypi b/gyp/common.gypi index 6d6b0e6671..163f2ce0a7 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -24,6 +24,19 @@ ], }], ], + 'target_conditions': [ + ['_type == "static_library"', { + 'conditions': [ + ['OS=="mac"', { + 'xcode_settings': { + 'OTHER_CPLUSPLUSFLAGS': [ '-fPIC' ], + }, + }, { + 'cflags_cc': [ '-fPIC' ], + }] + ], + }], + ], 'cflags_cc': [ '-std=c++11', '-Werror', '-Wall', '-Wextra', '-Wshadow', '-frtti', '-fexceptions' ], 'configurations': { 'Debug': { -- cgit v1.2.1