Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: gyp/common_conditions.gypi

Issue 406613003: Introduce skia_pic gyp variable. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Set fPIE and pie for executables except on Android. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/common_variables.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gyp/common_conditions.gypi
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index d03dfb00a6cea198a7a3e59d5f8814a29208fb01..3c6a1b50d17083d3f2915f02e2b16ccb164f5e99 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -8,6 +8,24 @@
'SK_FORCE_DISTANCEFIELD_FONTS=<(skia_force_distancefield_fonts)',
],
'conditions' : [
+ ['skia_pic', {
+ 'cflags': [
+ '-fPIC',
+ ],
+ 'conditions' : [
+ # FIXME: The reason we don't do this on Android is due to the way
+ # we build the executables/skia_launcher on Android. See
+ # https://codereview.chromium.org/406613003/diff/1/gyp/common_conditions.gypi#newcode455
+ ['skia_os != "android"', {
+ 'target_conditions': [
+ [ '_type == "executable"', {
+ 'cflags': [ '-fPIE' ],
+ 'ldflags': [ '-pie' ],
+ }],
+ ],
+ }],
+ ],
+ }],
[ 'skia_arch_type == "arm64"', {
'cflags': [
'-ffp-contract=off',
@@ -403,9 +421,6 @@
},
'conditions' : [
[ 'skia_shared_lib', {
- 'cflags': [
- '-fPIC',
- ],
'defines': [
'SKIA_DLL',
'SKIA_IMPLEMENTATION=1',
@@ -449,23 +464,9 @@
'conditions' : [
[ 'skia_sanitizer == "thread"', {
'defines': [ 'SK_DYNAMIC_ANNOTATIONS_ENABLED=1' ],
- 'cflags': [ '-fPIC' ],
- 'target_conditions': [
- [ '_type == "executable"', {
- 'cflags': [ '-fPIE' ],
- 'ldflags': [ '-pie' ],
- }],
- ],
}],
[ 'skia_sanitizer == "undefined"', {
- 'cflags': [ '-fPIC' ],
'cflags_cc!': ['-fno-rtti'],
- 'target_conditions': [
- [ '_type == "executable"', {
- 'cflags': [ '-fPIE' ],
- 'ldflags': [ '-pie' ],
- }],
- ],
}],
],
}],
@@ -664,9 +665,6 @@
],
}],
[ 'skia_shared_lib', {
- 'cflags': [
- '-fPIC',
- ],
'defines': [
'SKIA_DLL',
'SKIA_IMPLEMENTATION=1',
« no previous file with comments | « no previous file | gyp/common_variables.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698