Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # |
| 3 | # Copyright 2016 Google Inc. |
| 4 | # |
| 5 | # Use of this source code is governed by a BSD-style license that can be |
| 6 | # found in the LICENSE file. |
| 7 | |
| 8 | # Generate Android.bp for Skia from GN configuration. |
| 9 | |
| 10 | import json |
| 11 | import os |
| 12 | import pprint |
| 13 | import string |
| 14 | import subprocess |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 15 | import tempfile |
| 16 | |
| 17 | # First we start off with a template for Android.bp, |
| 18 | # with holes for source lists and include directories. |
| 19 | bp = string.Template('''// This file is autogenerated by gn_to_bp.py. |
| 20 | |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 21 | cc_library_static { |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 22 | name: "libskia", |
| 23 | cflags: [ |
Leon Scroggins III | 981a31e | 2017-10-06 11:53:53 -0400 | [diff] [blame] | 24 | $cflags |
| 25 | ], |
| 26 | |
| 27 | cppflags:[ |
| 28 | $cflags_cc |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 29 | ], |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 30 | |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 31 | export_include_dirs: [ |
| 32 | $export_includes |
| 33 | ], |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 34 | |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 35 | local_include_dirs: [ |
| 36 | $local_includes |
| 37 | ], |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 38 | |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 39 | srcs: [ |
| 40 | $srcs |
| 41 | ], |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 42 | |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 43 | arch: { |
| 44 | arm: { |
| 45 | srcs: [ |
| 46 | $arm_srcs |
| 47 | ], |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 48 | |
Leon Scroggins III | f7332d3 | 2017-08-10 09:09:54 -0400 | [diff] [blame] | 49 | neon: { |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 50 | srcs: [ |
| 51 | $arm_neon_srcs |
| 52 | ], |
| 53 | }, |
| 54 | }, |
| 55 | |
| 56 | arm64: { |
| 57 | srcs: [ |
| 58 | $arm64_srcs |
| 59 | ], |
| 60 | }, |
| 61 | |
| 62 | mips: { |
| 63 | srcs: [ |
Mike Klein | 40a82bd | 2016-12-20 17:34:29 -0500 | [diff] [blame] | 64 | $none_srcs |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 65 | ], |
| 66 | }, |
| 67 | |
| 68 | mips64: { |
| 69 | srcs: [ |
Mike Klein | 40a82bd | 2016-12-20 17:34:29 -0500 | [diff] [blame] | 70 | $none_srcs |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 71 | ], |
| 72 | }, |
| 73 | |
| 74 | x86: { |
| 75 | srcs: [ |
| 76 | $x86_srcs |
| 77 | ], |
Leon Scroggins III | 74663e7 | 2017-11-30 14:42:58 -0500 | [diff] [blame] | 78 | cflags: [ |
Leon Scroggins III | 6d892f5 | 2017-12-01 09:48:10 -0500 | [diff] [blame] | 79 | // Clang seems to think new/malloc will only be 4-byte aligned |
| 80 | // on x86 Android. We're pretty sure it's actually 8-byte |
| 81 | // alignment. tests/OverAlignedTest.cpp has more information, |
| 82 | // and should fail if we're wrong. |
Leon Scroggins III | 74663e7 | 2017-11-30 14:42:58 -0500 | [diff] [blame] | 83 | "-Wno-over-aligned" |
| 84 | ], |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 85 | }, |
| 86 | |
| 87 | x86_64: { |
| 88 | srcs: [ |
| 89 | $x86_srcs |
| 90 | ], |
| 91 | }, |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 92 | }, |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 93 | |
Zhizhou Yang | e18b779 | 2017-12-11 10:37:44 -0800 | [diff] [blame] | 94 | defaults: ["skia_deps", |
| 95 | "skia_pgo", |
| 96 | ], |
| 97 | } |
| 98 | |
| 99 | // Build libskia with PGO by default. |
| 100 | // Location of PGO profile data is defined in build/soong/cc/pgo.go |
| 101 | // and is separate from skia. |
| 102 | // To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable |
| 103 | // or set enable_profile_use property to false. |
| 104 | cc_defaults { |
| 105 | name: "skia_pgo", |
| 106 | pgo: { |
| 107 | instrumentation: true, |
| 108 | profile_file: "skia/skia.profdata", |
| 109 | benchmarks: ["hwui", "skia"], |
| 110 | enable_profile_use: true, |
| 111 | }, |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 112 | } |
| 113 | |
Pirama Arumuga Nainar | de2b95e | 2017-12-13 11:07:39 -0800 | [diff] [blame] | 114 | // "defaults" property to disable profile use for Skia tools and benchmarks. |
| 115 | cc_defaults { |
| 116 | name: "skia_pgo_no_profile_use", |
| 117 | defaults: [ |
| 118 | "skia_pgo", |
| 119 | ], |
| 120 | pgo: { |
| 121 | enable_profile_use: false, |
| 122 | }, |
| 123 | } |
| 124 | |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 125 | cc_defaults { |
| 126 | name: "skia_deps", |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 127 | shared_libs: [ |
| 128 | "libEGL", |
| 129 | "libGLESv2", |
| 130 | "libdng_sdk", |
| 131 | "libexpat", |
| 132 | "libft2", |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 133 | "libheif", |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 134 | "libicui18n", |
| 135 | "libicuuc", |
| 136 | "libjpeg", |
| 137 | "liblog", |
| 138 | "libpiex", |
| 139 | "libpng", |
| 140 | "libvulkan", |
| 141 | "libz", |
Derek Sollenberger | 488f0d6 | 2017-03-03 15:48:33 -0500 | [diff] [blame] | 142 | "libcutils", |
Stan Iliev | 7e910df | 2017-06-02 10:29:21 -0400 | [diff] [blame] | 143 | "libnativewindow", |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 144 | ], |
| 145 | static_libs: [ |
Matt Sarett | a309109 | 2017-02-20 12:50:52 -0500 | [diff] [blame] | 146 | "libarect", |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 147 | "libsfntly", |
| 148 | "libwebp-decode", |
| 149 | "libwebp-encode", |
| 150 | ], |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 151 | group_static_libs: true, |
| 152 | } |
| 153 | |
| 154 | cc_defaults { |
| 155 | name: "skia_tool_deps", |
| 156 | defaults: [ |
Pirama Arumuga Nainar | de2b95e | 2017-12-13 11:07:39 -0800 | [diff] [blame] | 157 | "skia_deps", |
| 158 | "skia_pgo_no_profile_use" |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 159 | ], |
| 160 | static_libs: [ |
| 161 | "libjsoncpp", |
| 162 | "libskia", |
| 163 | ], |
| 164 | cflags: [ |
Derek Sollenberger | 9a72ae1 | 2017-12-14 13:01:30 -0500 | [diff] [blame] | 165 | "-Wno-unused-parameter", |
| 166 | "-Wno-unused-variable", |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 167 | ], |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | cc_test { |
| 171 | name: "skia_dm", |
| 172 | |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 173 | defaults: [ |
| 174 | "skia_tool_deps" |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 175 | ], |
| 176 | |
| 177 | local_include_dirs: [ |
| 178 | $dm_includes |
| 179 | ], |
| 180 | |
| 181 | srcs: [ |
| 182 | $dm_srcs |
| 183 | ], |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | cc_test { |
| 187 | name: "skia_nanobench", |
| 188 | |
Derek Sollenberger | 5a93216 | 2017-09-21 14:25:14 -0400 | [diff] [blame] | 189 | defaults: [ |
| 190 | "skia_tool_deps" |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 191 | ], |
| 192 | |
| 193 | local_include_dirs: [ |
| 194 | $nanobench_includes |
| 195 | ], |
| 196 | |
| 197 | srcs: [ |
| 198 | $nanobench_srcs |
| 199 | ], |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 200 | }''') |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 201 | |
| 202 | # We'll run GN to get the main source lists and include directories for Skia. |
| 203 | gn_args = { |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 204 | 'is_official_build': 'true', |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 205 | 'skia_enable_tools': 'true', |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 206 | 'skia_use_libheif': 'true', |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 207 | 'skia_use_vulkan': 'true', |
| 208 | 'target_cpu': '"none"', |
| 209 | 'target_os': '"android"', |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 210 | 'skia_vulkan_header': '"Skia_Vulkan_Android.h"', |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 211 | } |
| 212 | gn_args = ' '.join(sorted('%s=%s' % (k,v) for (k,v) in gn_args.iteritems())) |
| 213 | |
| 214 | tmp = tempfile.mkdtemp() |
| 215 | subprocess.check_call(['gn', 'gen', tmp, '--args=%s' % gn_args, '--ide=json']) |
| 216 | |
| 217 | js = json.load(open(os.path.join(tmp, 'project.json'))) |
| 218 | |
| 219 | def strip_slashes(lst): |
Ben Wagner | e127523 | 2017-02-23 18:00:06 -0500 | [diff] [blame] | 220 | return {str(p.lstrip('/')) for p in lst} |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 221 | |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 222 | srcs = strip_slashes(js['targets']['//:skia']['sources']) |
Leon Scroggins III | 981a31e | 2017-10-06 11:53:53 -0400 | [diff] [blame] | 223 | cflags = strip_slashes(js['targets']['//:skia']['cflags']) |
| 224 | cflags_cc = strip_slashes(js['targets']['//:skia']['cflags_cc']) |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 225 | local_includes = strip_slashes(js['targets']['//:skia']['include_dirs']) |
| 226 | export_includes = strip_slashes(js['targets']['//:public']['include_dirs']) |
| 227 | |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 228 | dm_srcs = strip_slashes(js['targets']['//:dm']['sources']) |
| 229 | dm_includes = strip_slashes(js['targets']['//:dm']['include_dirs']) |
| 230 | |
| 231 | nanobench_target = js['targets']['//:nanobench'] |
| 232 | nanobench_srcs = strip_slashes(nanobench_target['sources']) |
| 233 | nanobench_includes = strip_slashes(nanobench_target['include_dirs']) |
| 234 | |
| 235 | def GrabDependentSrcs(name, srcs_to_extend, exclude): |
| 236 | # Grab the sources from other targets that $name depends on (e.g. optional |
| 237 | # Skia components, gms, tests, etc). |
| 238 | for dep in js['targets'][name]['deps']: |
| 239 | if 'third_party' in dep: |
| 240 | continue # We've handled all third-party DEPS as static or shared_libs. |
| 241 | if 'none' in dep: |
| 242 | continue # We'll handle all cpu-specific sources manually later. |
| 243 | if exclude and exclude in dep: |
| 244 | continue |
Ben Wagner | e127523 | 2017-02-23 18:00:06 -0500 | [diff] [blame] | 245 | srcs_to_extend.update(strip_slashes(js['targets'][dep].get('sources', []))) |
| 246 | GrabDependentSrcs(dep, srcs_to_extend, exclude) |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 247 | |
| 248 | GrabDependentSrcs('//:skia', srcs, None) |
| 249 | GrabDependentSrcs('//:dm', dm_srcs, 'skia') |
| 250 | GrabDependentSrcs('//:nanobench', nanobench_srcs, 'skia') |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 251 | |
| 252 | # No need to list headers. |
Ben Wagner | e127523 | 2017-02-23 18:00:06 -0500 | [diff] [blame] | 253 | srcs = {s for s in srcs if not s.endswith('.h')} |
| 254 | dm_srcs = {s for s in dm_srcs if not s.endswith('.h')} |
| 255 | nanobench_srcs = {s for s in nanobench_srcs if not s.endswith('.h')} |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 256 | |
Leon Scroggins III | 981a31e | 2017-10-06 11:53:53 -0400 | [diff] [blame] | 257 | # Only use the generated flags related to warnings. |
| 258 | cflags = {s for s in cflags if s.startswith('-W')} |
| 259 | cflags_cc = {s for s in cflags_cc if s.startswith('-W')} |
| 260 | # Add the rest of the flags we want. |
| 261 | cflags = cflags.union([ |
| 262 | "-fvisibility=hidden", |
| 263 | "-D_FORTIFY_SOURCE=1", |
| 264 | "-DSKIA_DLL", |
| 265 | "-DSKIA_IMPLEMENTATION=1", |
| 266 | "-DATRACE_TAG=ATRACE_TAG_VIEW", |
| 267 | ]) |
| 268 | cflags_cc.add("-fexceptions") |
| 269 | |
| 270 | # We need to undefine FORTIFY_SOURCE before we define it. Insert it at the |
| 271 | # beginning after sorting. |
| 272 | cflags = sorted(cflags) |
| 273 | cflags.insert(0, "-U_FORTIFY_SOURCE") |
| 274 | |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 275 | # We need to add the include path to the vulkan defines and header file set in |
| 276 | # then skia_vulkan_header gn arg that is used for framework builds. |
| 277 | local_includes.add("platform_tools/android/vulkan") |
| 278 | export_includes.add("platform_tools/android/vulkan") |
| 279 | |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 280 | # Most defines go into SkUserConfig.h, where they're seen by Skia and its users. |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 281 | defines = [str(d) for d in js['targets']['//:skia']['defines']] |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 282 | defines.remove('NDEBUG') # Let the Android build control this. |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 283 | defines.remove('SKIA_IMPLEMENTATION=1') # Only libskia should have this define. |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 284 | |
| 285 | # For architecture specific files, it's easier to just read the same source |
| 286 | # that GN does (opts.gni) rather than re-run GN once for each architecture. |
| 287 | |
| 288 | # This .gni file we want to read is close enough to Python syntax |
| 289 | # that we can use execfile() if we supply definitions for GN builtins. |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 290 | |
| 291 | def get_path_info(path, kind): |
| 292 | assert kind == "abspath" |
| 293 | # While we want absolute paths in GN, relative paths work best here. |
| 294 | return path |
| 295 | |
| 296 | builtins = { 'get_path_info': get_path_info } |
| 297 | defs = {} |
Leon Scroggins III | 4f8a467 | 2016-12-19 09:32:21 -0500 | [diff] [blame] | 298 | here = os.path.dirname(__file__) |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 299 | execfile(os.path.join(here, 'opts.gni'), builtins, defs) |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 300 | |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 301 | # Turn paths from opts.gni into paths relative to external/skia. |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 302 | def scrub(lst): |
| 303 | # Perform any string substitutions. |
| 304 | for var in defs: |
| 305 | if type(defs[var]) is str: |
| 306 | lst = [ p.replace('$'+var, defs[var]) for p in lst ] |
| 307 | # Relativize paths to top-level skia/ directory. |
| 308 | return [os.path.relpath(p, '..') for p in lst] |
| 309 | |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 310 | # Turn a list of strings into the style bpfmt outputs. |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 311 | def bpfmt(indent, lst, sort=True): |
| 312 | if sort: |
| 313 | lst = sorted(lst) |
| 314 | return ('\n' + ' '*indent).join('"%s",' % v for v in lst) |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 315 | |
| 316 | # OK! We have everything to fill in Android.bp... |
| 317 | with open('Android.bp', 'w') as f: |
| 318 | print >>f, bp.substitute({ |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 319 | 'export_includes': bpfmt(8, export_includes), |
| 320 | 'local_includes': bpfmt(8, local_includes), |
| 321 | 'srcs': bpfmt(8, srcs), |
Leon Scroggins III | 981a31e | 2017-10-06 11:53:53 -0400 | [diff] [blame] | 322 | 'cflags': bpfmt(8, cflags, False), |
| 323 | 'cflags_cc': bpfmt(8, cflags_cc), |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 324 | |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 325 | 'arm_srcs': bpfmt(16, scrub(defs['armv7'])), |
| 326 | 'arm_neon_srcs': bpfmt(20, scrub(defs['neon'])), |
| 327 | 'arm64_srcs': bpfmt(16, scrub(defs['arm64'] + |
| 328 | defs['crc32'])), |
Mike Klein | 40a82bd | 2016-12-20 17:34:29 -0500 | [diff] [blame] | 329 | 'none_srcs': bpfmt(16, scrub(defs['none'])), |
Mike Klein | ee43f6f | 2016-12-12 14:09:38 -0500 | [diff] [blame] | 330 | 'x86_srcs': bpfmt(16, scrub(defs['sse2'] + |
| 331 | defs['ssse3'] + |
| 332 | defs['sse41'] + |
| 333 | defs['sse42'] + |
Mike Reed | e32500f | 2017-07-19 17:20:37 -0400 | [diff] [blame] | 334 | defs['avx' ])), |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 335 | |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 336 | 'dm_includes' : bpfmt(8, dm_includes), |
| 337 | 'dm_srcs' : bpfmt(8, dm_srcs), |
| 338 | |
| 339 | 'nanobench_includes' : bpfmt(8, nanobench_includes), |
| 340 | 'nanobench_srcs' : bpfmt(8, nanobench_srcs), |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 341 | }) |
| 342 | |
| 343 | #... and all the #defines we want to put in SkUserConfig.h. |
Mike Klein | c308333 | 2016-12-12 09:03:56 -0500 | [diff] [blame] | 344 | with open('include/config/SkUserConfig.h', 'w') as f: |
Leon Scroggins III | 51b2f1b | 2017-07-11 15:53:41 -0400 | [diff] [blame] | 345 | print >>f, '// DO NOT MODIFY! This file is autogenerated by gn_to_bp.py.' |
| 346 | print >>f, '// If need to change a define, modify SkUserConfigManual.h' |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 347 | print >>f, '#ifndef SkUserConfig_DEFINED' |
| 348 | print >>f, '#define SkUserConfig_DEFINED' |
Leon Scroggins III | 51b2f1b | 2017-07-11 15:53:41 -0400 | [diff] [blame] | 349 | print >>f, '#include "SkUserConfigManual.h"' |
Mike Klein | 27eb22b | 2016-12-07 12:27:56 -0500 | [diff] [blame] | 350 | for define in sorted(defines): |
Mike Klein | c308333 | 2016-12-12 09:03:56 -0500 | [diff] [blame] | 351 | print >>f, ' #define', define.replace('=', ' ') |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 352 | print >>f, '#endif//SkUserConfig_DEFINED' |