Introduce skia_pic gyp variable.
skia_pic tells ninja to use -fPIC when building for position
independent code.
Set skia_pic to true when building our existing targets that
require position independent code.
Also use skia_pic when building for Android.
R=mtklein@google.com, djsollen@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/406613003
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index e084cd9..b7c82e3 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -181,6 +181,12 @@
'skia_clang_build%': 0,
'skia_keep_frame_pointer%': 0,
}],
+ [ 'skia_shared_lib or skia_sanitizer or skia_os == "android"', {
+ 'skia_pic%' : 1,
+ }, {
+ 'skia_pic%' : 0,
+ }
+ ],
],
# Re-define all variables defined within the level-2 'variables' dict,