aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/gn_to_bp.py
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-12-12 09:03:56 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-12 15:18:22 +0000
commitc30833327f0dda75a8fbe061f3f1966d1f6621a3 (patch)
tree2a9d23d550e22ff2620c416f8924437a1cac4867 /gn/gn_to_bp.py
parentc87f99ef0649a525471971c4edd8b57fc0f7ef3c (diff)
proposed gn_to_bp fixes
in response to 5784 Change-Id: I3ad34a30743e7ffbd04767668c288a4f884eb19c Reviewed-on: https://skia-review.googlesource.com/5732 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn/gn_to_bp.py')
-rw-r--r--gn/gn_to_bp.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/gn/gn_to_bp.py b/gn/gn_to_bp.py
index bb75b8394a..1791697d37 100644
--- a/gn/gn_to_bp.py
+++ b/gn/gn_to_bp.py
@@ -81,7 +81,7 @@ cc_library {
"libz",
],
static_libs: [
- "cpufeatures", // TODO: use this for CRC32 detection
+ //"cpufeatures", // TODO: use this for CRC32 detection
"libsfntly",
"libwebp-decode",
"libwebp-encode",
@@ -92,6 +92,8 @@ cc_library {
# We'll run GN to get the main source lists and include directories for Skia.
gn_args = {
'skia_enable_vulkan_debug_layers': 'false',
+ 'skia_use_cpufeatures': 'false',
+ 'skia_use_system_expat': 'true',
'skia_use_vulkan': 'true',
'target_cpu': '"none"',
'target_os': '"android"',
@@ -114,6 +116,8 @@ export_includes = strip_slashes(js['targets']['//:public']['include_dirs'])
for dep in js['targets']['//:skia']['deps']:
if 'third_party' in dep:
continue # We've handled all third-party DEPS as static or shared_libs.
+ if 'none' in dep:
+ continue # We'll handle all cpu-specific sources manually later.
srcs.extend(strip_slashes(js['targets'][dep].get('sources', [])))
# No need to list headers.
@@ -123,7 +127,6 @@ srcs = [s for s in srcs if not s.endswith('.h')]
# Start with the defines :skia uses, minus a couple. We'll add more in a bit.
defines = [str(d) for d in js['targets']['//:skia']['defines']]
defines.remove('SKIA_IMPLEMENTATION=1') # Only libskia should have this define.
-defines.remove('XML_STATIC') # On Android, libexpat is dynamically linked.
# For architecture specific files, it's easier to just read the same source
# that GN does (opts.gni) rather than re-run GN once for each architecture.
@@ -191,10 +194,10 @@ with open('Android.bp', 'w') as f:
})
#... and all the #defines we want to put in SkUserConfig.h.
-with open('SkUserConfig.h', 'w') as f:
+with open('include/config/SkUserConfig.h', 'w') as f:
print >>f, '// This file is autogenerated by gn_to_bp.py.'
print >>f, '#ifndef SkUserConfig_DEFINED'
print >>f, '#define SkUserConfig_DEFINED'
for define in sorted(defines):
- print >>f, ' #define', define
+ print >>f, ' #define', define.replace('=', ' ')
print >>f, '#endif//SkUserConfig_DEFINED'