benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # Skylark macros |
| 3 | ################################################################################ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 4 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 5 | is_bazel = not hasattr(native, "genmpm") |
| 6 | |
| 7 | def portable_select(select_dict, bazel_condition, default_condition): |
| 8 | """Replaces select() with a Bazel-friendly wrapper. |
| 9 | |
| 10 | Args: |
| 11 | select_dict: Dictionary in the same format as select(). |
| 12 | Returns: |
| 13 | If Blaze platform, returns select() using select_dict. |
| 14 | If Bazel platform, returns dependencies for condition |
| 15 | bazel_condition, or empty list if none specified. |
| 16 | """ |
| 17 | if is_bazel: |
| 18 | return select_dict.get(bazel_condition, select_dict[default_condition]) |
| 19 | else: |
| 20 | return select(select_dict) |
| 21 | |
| 22 | def skia_select(conditions, results): |
| 23 | """Replaces select() for conditions [UNIX, ANDROID, IOS] |
| 24 | |
| 25 | Args: |
| 26 | conditions: [CONDITION_UNIX, CONDITION_ANDROID, CONDITION_IOS] |
| 27 | results: [RESULT_UNIX, RESULT_ANDROID, RESULT_IOS] |
| 28 | Returns: |
| 29 | The result matching the platform condition. |
| 30 | """ |
| 31 | if len(conditions) != 3 or len(results) != 3: |
| 32 | fail("Must provide exactly 3 conditions and 3 results") |
| 33 | |
| 34 | selector = {} |
| 35 | for i in range(3): |
| 36 | selector[conditions[i]] = results[i] |
| 37 | return portable_select(selector, conditions[2], conditions[0]) |
| 38 | |
| 39 | def skia_glob(srcs): |
| 40 | """Replaces glob() with a version that accepts a struct. |
| 41 | |
| 42 | Args: |
| 43 | srcs: struct(include=[], exclude=[]) |
| 44 | Returns: |
| 45 | Equivalent of glob(srcs.include, exclude=srcs.exclude) |
| 46 | """ |
| 47 | if hasattr(srcs, 'include'): |
| 48 | if hasattr(srcs, 'exclude'): |
| 49 | return native.glob(srcs.include, exclude=srcs.exclude) |
| 50 | else: |
| 51 | return native.glob(srcs.include) |
| 52 | return [] |
| 53 | |
| 54 | ################################################################################ |
iroth | 849b175 | 2016-04-11 13:45:51 -0700 | [diff] [blame] | 55 | ## PRIVATE_HDRS |
| 56 | ################################################################################ |
| 57 | |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 58 | PRIVATE_HDRS_INCLUDE_LIST = [ |
| 59 | "include/private/**/*.h", |
| 60 | "src/**/*.inc", |
iroth | 849b175 | 2016-04-11 13:45:51 -0700 | [diff] [blame] | 61 | ] |
| 62 | |
| 63 | PRIVATE_HDRS = struct( |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 64 | include = PRIVATE_HDRS_INCLUDE_LIST, |
| 65 | ) |
| 66 | |
| 67 | ALL_HDRS = struct( |
| 68 | include = [ |
| 69 | "src/**/*.h", |
| 70 | "include/**/*.h", |
| 71 | ], |
iroth | 849b175 | 2016-04-11 13:45:51 -0700 | [diff] [blame] | 72 | ) |
| 73 | |
| 74 | ################################################################################ |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 75 | ## BASE_SRCS |
| 76 | ################################################################################ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 77 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 78 | # All platform-independent SRCS. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 79 | BASE_SRCS_ALL = struct( |
| 80 | include = [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 81 | "src/**/*.h", |
| 82 | "src/**/*.cpp", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 83 | |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 84 | # Third Party |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 85 | "third_party/etc1/*.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 86 | "third_party/etc1/*.h", |
Ben Wagner | d0a3b06 | 2016-10-24 14:11:12 -0400 | [diff] [blame] | 87 | "third_party/gif/*.cpp", |
| 88 | "third_party/gif/*.h", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 89 | ], |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 90 | # Note: PRIVATE_HDRS_INCLUDE_LIST is excluded from BASE_SRCS_ALL here |
| 91 | # because they are required to appear in srcs for some rules but hdrs for |
| 92 | # other rules. See internal cl/119566959. |
| 93 | exclude = PRIVATE_HDRS_INCLUDE_LIST + [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 94 | # Exclude platform-dependent files. |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 95 | "src/android/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 96 | "src/codec/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 97 | "src/device/xps/*", # Windows-only. Move to ports? |
| 98 | "src/doc/*_XPS.cpp", # Windows-only. Move to ports? |
| 99 | "src/gpu/gl/android/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 100 | "src/gpu/gl/egl/*", |
benjaminwagner | af3b35e | 2016-03-28 13:27:28 -0700 | [diff] [blame] | 101 | "src/gpu/gl/glfw/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 102 | "src/gpu/gl/glx/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 103 | "src/gpu/gl/iOS/*", |
| 104 | "src/gpu/gl/mac/*", |
| 105 | "src/gpu/gl/win/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 106 | "src/images/*", |
Mike Klein | e1caee1 | 2017-02-15 13:31:12 -0500 | [diff] [blame] | 107 | "src/jumper/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 108 | "src/opts/**/*", |
| 109 | "src/ports/**/*", |
| 110 | "src/utils/android/**/*", |
| 111 | "src/utils/mac/**/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 112 | "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports? |
| 113 | "src/utils/win/**/*", |
| 114 | "src/views/sdl/*", |
| 115 | "src/views/win/*", |
| 116 | "src/views/unix/*", |
| 117 | |
| 118 | # Exclude multiple definitions. |
| 119 | # TODO(mtklein): Move to opts? |
benjaminwagner | ca26a18 | 2016-03-14 15:21:12 -0700 | [diff] [blame] | 120 | "src/pdf/SkDocument_PDF_None.cpp", # We use src/pdf/SkPDFDocument.cpp. |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 121 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 122 | "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 123 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 124 | |
| 125 | # Exclude files that don't compile with the current DEFINES. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 126 | "src/gpu/gl/mesa/*", # Requires SK_MESA define. |
benjaminwagner | 921e48b | 2016-07-15 11:27:27 -0700 | [diff] [blame] | 127 | "src/svg/**/*", # Depends on XML. |
| 128 | "src/xml/**/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 129 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 130 | # Conflicting dependencies among Lua versions. See cl/107087297. |
| 131 | "src/utils/SkLua*", |
| 132 | |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 133 | # Not used. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 134 | "src/views/**/*", |
egdaniel | 32119f1 | 2016-02-22 10:07:54 -0800 | [diff] [blame] | 135 | |
| 136 | # Currently exclude all vulkan specific files |
| 137 | "src/gpu/vk/*", |
benjaminwagner | c896251 | 2016-09-30 12:06:27 -0700 | [diff] [blame] | 138 | |
| 139 | # Defines main. |
| 140 | "src/sksl/SkSLMain.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 141 | ], |
| 142 | ) |
| 143 | |
| 144 | # Platform-dependent SRCS for google3-default platform. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 145 | BASE_SRCS_UNIX = struct( |
| 146 | include = [ |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 147 | "src/android/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 148 | "src/codec/*", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 149 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 150 | "src/images/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 151 | "src/opts/**/*.cpp", |
| 152 | "src/opts/**/*.h", |
| 153 | "src/ports/**/*.cpp", |
| 154 | "src/ports/**/*.h", |
| 155 | ], |
| 156 | exclude = [ |
| 157 | "src/opts/*arm*", |
| 158 | "src/opts/*mips*", |
| 159 | "src/opts/*NEON*", |
| 160 | "src/opts/*neon*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 161 | # Included in :opts_ssse3 library. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 162 | "src/opts/*SSSE3*", |
| 163 | "src/opts/*ssse3*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 164 | # Included in :opts_sse4 library. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 165 | "src/opts/*SSE4*", |
| 166 | "src/opts/*sse4*", |
Mike Klein | 7147505 | 2016-09-30 11:34:54 -0400 | [diff] [blame] | 167 | # Included in :opts_avx or :opts_hsw |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 168 | "src/opts/*avx*", |
Mike Klein | 7147505 | 2016-09-30 11:34:54 -0400 | [diff] [blame] | 169 | "src/opts/*hsw*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 170 | "src/opts/SkBitmapProcState_opts_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 171 | "src/opts/SkBlitMask_opts_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 172 | "src/opts/SkBlitRow_opts_none.cpp", |
msarett | 6b4985c | 2016-03-10 07:15:59 -0800 | [diff] [blame] | 173 | "src/ports/*CG*", |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 174 | "src/ports/*WIC*", |
mtklein | 3f193a9 | 2016-03-10 08:52:05 -0800 | [diff] [blame] | 175 | "src/ports/*android*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 176 | "src/ports/*chromium*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 177 | "src/ports/*mac*", |
| 178 | "src/ports/*mozalloc*", |
| 179 | "src/ports/*nacl*", |
| 180 | "src/ports/*win*", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 181 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 182 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
benjaminwagner | d9dd581 | 2016-03-21 10:45:01 -0700 | [diff] [blame] | 183 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 184 | "src/ports/SkFontMgr_empty_factory.cpp", |
benjaminwagner | 404816e | 2015-12-03 05:04:03 -0800 | [diff] [blame] | 185 | "src/ports/SkFontMgr_fontconfig.cpp", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 186 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
Mike Klein | 4b698cb | 2017-02-09 15:28:53 -0500 | [diff] [blame] | 187 | "src/ports/SkGlobalInitialization_none.cpp", |
msarett | c1d0312 | 2016-03-25 08:58:55 -0700 | [diff] [blame] | 188 | "src/ports/SkImageEncoder_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 189 | "src/ports/SkImageGenerator_none.cpp", |
| 190 | "src/ports/SkTLS_none.cpp", |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 191 | ], |
| 192 | ) |
| 193 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 194 | # Platform-dependent SRCS for google3-default Android. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 195 | BASE_SRCS_ANDROID = struct( |
| 196 | include = [ |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 197 | "src/android/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 198 | "src/codec/*", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 199 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 200 | "src/images/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 201 | # TODO(benjaminwagner): Figure out how to compile with EGL. |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 202 | "src/opts/**/*.cpp", |
| 203 | "src/opts/**/*.h", |
| 204 | "src/ports/**/*.cpp", |
| 205 | "src/ports/**/*.h", |
| 206 | ], |
| 207 | exclude = [ |
| 208 | "src/opts/*mips*", |
| 209 | "src/opts/*SSE2*", |
| 210 | "src/opts/*SSSE3*", |
| 211 | "src/opts/*ssse3*", |
| 212 | "src/opts/*SSE4*", |
| 213 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 214 | "src/opts/*avx*", |
Mike Klein | fb2c633 | 2017-01-26 14:40:53 -0500 | [diff] [blame] | 215 | "src/opts/*hsw*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 216 | "src/opts/*x86*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 217 | "src/opts/SkBlitMask_opts_none.cpp", |
| 218 | "src/opts/SkBlitRow_opts_none.cpp", |
msarett | 6b4985c | 2016-03-10 07:15:59 -0800 | [diff] [blame] | 219 | "src/ports/*CG*", |
mtklein | 3f193a9 | 2016-03-10 08:52:05 -0800 | [diff] [blame] | 220 | "src/ports/*FontConfig*", |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 221 | "src/ports/*WIC*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 222 | "src/ports/*chromium*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 223 | "src/ports/*fontconfig*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 224 | "src/ports/*mac*", |
| 225 | "src/ports/*mozalloc*", |
| 226 | "src/ports/*nacl*", |
| 227 | "src/ports/*win*", |
| 228 | "src/ports/SkDebug_stdio.cpp", |
| 229 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 230 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
benjaminwagner | d9dd581 | 2016-03-21 10:45:01 -0700 | [diff] [blame] | 231 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 232 | "src/ports/SkFontMgr_empty_factory.cpp", |
Mike Klein | 4b698cb | 2017-02-09 15:28:53 -0500 | [diff] [blame] | 233 | "src/ports/SkGlobalInitialization_none.cpp", |
msarett | c1d0312 | 2016-03-25 08:58:55 -0700 | [diff] [blame] | 234 | "src/ports/SkImageEncoder_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 235 | "src/ports/SkImageGenerator_none.cpp", |
| 236 | "src/ports/SkTLS_none.cpp", |
| 237 | ], |
| 238 | ) |
| 239 | |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 240 | # Platform-dependent SRCS for google3-default iOS. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 241 | BASE_SRCS_IOS = struct( |
| 242 | include = [ |
msarett | 2775cf5 | 2016-02-17 14:14:25 -0800 | [diff] [blame] | 243 | "src/android/*", |
| 244 | "src/codec/*", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 245 | "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
| 246 | "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 247 | "src/opts/**/*.cpp", |
| 248 | "src/opts/**/*.h", |
| 249 | "src/ports/**/*.cpp", |
| 250 | "src/ports/**/*.h", |
iroth | ab669de | 2016-02-16 19:17:01 -0800 | [diff] [blame] | 251 | "src/utils/mac/*.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 252 | ], |
| 253 | exclude = [ |
msarett | 2775cf5 | 2016-02-17 14:14:25 -0800 | [diff] [blame] | 254 | "src/codec/*Ico*.cpp", |
msarett | 2775cf5 | 2016-02-17 14:14:25 -0800 | [diff] [blame] | 255 | "src/codec/*Webp*.cpp", |
| 256 | "src/codec/*Png*", |
| 257 | "src/codec/*Raw*.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 258 | "src/opts/*mips*", |
| 259 | "src/opts/*NEON*", |
| 260 | "src/opts/*neon*", |
| 261 | "src/opts/*SSE2*", |
| 262 | "src/opts/*SSSE3*", |
| 263 | "src/opts/*ssse3*", |
| 264 | "src/opts/*SSE4*", |
| 265 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 266 | "src/opts/*avx*", |
Mike Klein | fb2c633 | 2017-01-26 14:40:53 -0500 | [diff] [blame] | 267 | "src/opts/*hsw*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 268 | "src/opts/*x86*", |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 269 | "src/opts/SkBlitMask_opts_arm*.cpp", |
| 270 | "src/opts/SkBlitRow_opts_arm*.cpp", |
mtklein | 3f193a9 | 2016-03-10 08:52:05 -0800 | [diff] [blame] | 271 | "src/ports/*CG*", |
| 272 | "src/ports/*FontConfig*", |
| 273 | "src/ports/*FreeType*", |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 274 | "src/ports/*WIC*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 275 | "src/ports/*android*", |
| 276 | "src/ports/*chromium*", |
| 277 | "src/ports/*fontconfig*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 278 | "src/ports/*mozalloc*", |
| 279 | "src/ports/*nacl*", |
| 280 | "src/ports/*win*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 281 | "src/ports/SkFontMgr_custom.cpp", |
Ben Wagner | 8ab590f | 2017-02-08 17:29:33 -0500 | [diff] [blame] | 282 | "src/ports/SkFontMgr_custom_directory.cpp", |
| 283 | "src/ports/SkFontMgr_custom_embedded.cpp", |
| 284 | "src/ports/SkFontMgr_custom_empty.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 285 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 286 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
benjaminwagner | d9dd581 | 2016-03-21 10:45:01 -0700 | [diff] [blame] | 287 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 288 | "src/ports/SkFontMgr_empty_factory.cpp", |
Mike Klein | 4b698cb | 2017-02-09 15:28:53 -0500 | [diff] [blame] | 289 | "src/ports/SkGlobalInitialization_none.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 290 | "src/ports/SkImageGenerator_none.cpp", |
| 291 | "src/ports/SkTLS_none.cpp", |
| 292 | ], |
| 293 | ) |
| 294 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 295 | ################################################################################ |
Mike Klein | c8deb02 | 2016-09-30 12:36:55 -0400 | [diff] [blame] | 296 | ## SSSE3/SSE4/AVX/HSW SRCS |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 297 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 298 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 299 | SSSE3_SRCS = struct( |
| 300 | include = [ |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 301 | "src/opts/*SSSE3*.cpp", |
| 302 | "src/opts/*ssse3*.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 303 | ], |
| 304 | ) |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 305 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 306 | SSE4_SRCS = struct( |
| 307 | include = [ |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 308 | "src/opts/*SSE4*.cpp", |
| 309 | "src/opts/*sse4*.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 310 | ], |
| 311 | ) |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 312 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 313 | AVX_SRCS = struct( |
| 314 | include = [ |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 315 | "src/opts/*_avx.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 316 | ], |
| 317 | ) |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 318 | |
Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 319 | HSW_SRCS = struct( |
| 320 | include = [ |
| 321 | "src/opts/*_hsw.cpp", |
| 322 | ], |
| 323 | ) |
| 324 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 325 | ################################################################################ |
| 326 | ## BASE_HDRS |
| 327 | ################################################################################ |
| 328 | |
| 329 | BASE_HDRS = struct( |
| 330 | include = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 331 | "include/**/*.h", |
| 332 | ], |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 333 | exclude = PRIVATE_HDRS_INCLUDE_LIST + [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 334 | # Not used. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 335 | "include/views/**/*", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 336 | ], |
| 337 | ) |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 338 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 339 | ################################################################################ |
| 340 | ## BASE_DEPS |
| 341 | ################################################################################ |
| 342 | |
| 343 | BASE_DEPS_ALL = [] |
| 344 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 345 | BASE_DEPS_UNIX = [ |
iroth | 330043c | 2016-01-12 14:22:24 -0800 | [diff] [blame] | 346 | ":opts_ssse3", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 347 | ":opts_sse4", |
| 348 | ":opts_avx", |
Mike Klein | c8deb02 | 2016-09-30 12:36:55 -0400 | [diff] [blame] | 349 | ":opts_hsw", |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 350 | ] |
| 351 | |
| 352 | BASE_DEPS_ANDROID = [] |
| 353 | |
| 354 | BASE_DEPS_IOS = [] |
| 355 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 356 | ################################################################################ |
| 357 | ## INCLUDES |
| 358 | ################################################################################ |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 359 | |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 360 | # Includes needed by Skia implementation. Not public includes. |
| 361 | INCLUDES = [ |
benjaminwagner | fa7e1a0 | 2015-11-13 12:27:08 -0800 | [diff] [blame] | 362 | "include/android", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 363 | "include/c", |
robertphillips | 188d44c | 2016-02-01 04:54:14 -0800 | [diff] [blame] | 364 | "include/client/android", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 365 | "include/codec", |
| 366 | "include/config", |
| 367 | "include/core", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 368 | "include/effects", |
| 369 | "include/gpu", |
| 370 | "include/images", |
| 371 | "include/pathops", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 372 | "include/pipe", |
| 373 | "include/ports", |
| 374 | "include/private", |
| 375 | "include/utils", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 376 | "include/utils/mac", |
| 377 | "include/utils/win", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 378 | "include/svg", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 379 | "include/xml", |
benjaminwagner | fa7e1a0 | 2015-11-13 12:27:08 -0800 | [diff] [blame] | 380 | "src/codec", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 381 | "src/core", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 382 | "src/gpu", |
| 383 | "src/image", |
| 384 | "src/lazy", |
| 385 | "src/opts", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 386 | "src/ports", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 387 | "src/pdf", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 388 | "src/sfnt", |
benjaminwagner | c896251 | 2016-09-30 12:06:27 -0700 | [diff] [blame] | 389 | "src/sksl", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 390 | "src/utils", |
| 391 | "third_party/etc1", |
Ben Wagner | d0a3b06 | 2016-10-24 14:11:12 -0400 | [diff] [blame] | 392 | "third_party/gif", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 393 | ] |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 394 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 395 | ################################################################################ |
| 396 | ## DM_SRCS |
| 397 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 398 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 399 | DM_SRCS_ALL = struct( |
| 400 | include = [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 401 | "dm/*.cpp", |
| 402 | "dm/*.h", |
| 403 | "gm/*.c", |
| 404 | "gm/*.cpp", |
| 405 | "gm/*.h", |
| 406 | "tests/*.cpp", |
| 407 | "tests/*.h", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 408 | "tools/BigPathBench.inc", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 409 | "tools/CrashHandler.cpp", |
| 410 | "tools/CrashHandler.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 411 | "tools/ProcStats.cpp", |
| 412 | "tools/ProcStats.h", |
| 413 | "tools/Resources.cpp", |
| 414 | "tools/Resources.h", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 415 | "tools/SkJSONCPP.h", |
| 416 | "tools/UrlDataManager.cpp", |
| 417 | "tools/UrlDataManager.h", |
| 418 | "tools/debugger/*.cpp", |
| 419 | "tools/debugger/*.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 420 | "tools/flags/*.cpp", |
| 421 | "tools/flags/*.h", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 422 | "tools/gpu/**/*.cpp", |
| 423 | "tools/gpu/**/*.h", |
brianosman | 6d3119c | 2016-04-19 19:41:54 -0700 | [diff] [blame] | 424 | "tools/picture_utils.cpp", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 425 | "tools/picture_utils.h", |
mtklein | e1fc452 | 2016-02-09 12:32:52 -0800 | [diff] [blame] | 426 | "tools/random_parse_path.cpp", |
| 427 | "tools/random_parse_path.h", |
benjaminwagner | 3288514 | 2015-10-24 07:55:31 -0700 | [diff] [blame] | 428 | "tools/sk_tool_utils.cpp", |
| 429 | "tools/sk_tool_utils.h", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 430 | "tools/sk_tool_utils_flags.h", |
benjaminwagner | 3288514 | 2015-10-24 07:55:31 -0700 | [diff] [blame] | 431 | "tools/sk_tool_utils_font.cpp", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 432 | "tools/test_font_monospace.inc", |
| 433 | "tools/test_font_sans_serif.inc", |
| 434 | "tools/test_font_serif.inc", |
| 435 | "tools/test_font_index.inc", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 436 | "tools/timer/*.cpp", |
| 437 | "tools/timer/*.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 438 | ], |
| 439 | exclude = [ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 440 | "tests/FontMgrAndroidParserTest.cpp", # Android-only. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 441 | "tests/skia_test.cpp", # Old main. |
| 442 | "tests/SkpSkGrTest.cpp", # Alternate main. |
benjaminwagner | 921e48b | 2016-07-15 11:27:27 -0700 | [diff] [blame] | 443 | "tests/SVGDeviceTest.cpp", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 444 | "tools/gpu/gl/angle/*", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 445 | "tools/gpu/gl/egl/*", |
| 446 | "tools/gpu/gl/glx/*", |
| 447 | "tools/gpu/gl/iOS/*", |
| 448 | "tools/gpu/gl/mac/*", |
| 449 | "tools/gpu/gl/mesa/*", |
| 450 | "tools/gpu/gl/win/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 451 | "tools/timer/SysTimer_mach.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 452 | "tools/timer/SysTimer_windows.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 453 | ], |
| 454 | ) |
| 455 | |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 456 | DM_SRCS_UNIX = struct( |
| 457 | include = [ |
| 458 | "tools/gpu/gl/CreatePlatformGLContext_none.cpp", |
| 459 | ], |
| 460 | ) |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 461 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 462 | DM_SRCS_ANDROID = struct( |
| 463 | include = [ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 464 | "tests/FontMgrAndroidParserTest.cpp", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 465 | # TODO(benjaminwagner): Figure out how to compile with EGL. |
| 466 | "tools/gpu/gl/CreatePlatformGLContext_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 467 | ], |
| 468 | ) |
| 469 | |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 470 | DM_SRCS_IOS = struct( |
| 471 | include = [ |
| 472 | "tools/gpu/iOS/CreatePlatformGLContext_iOS.cpp", |
| 473 | ], |
| 474 | ) |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 475 | |
| 476 | ################################################################################ |
| 477 | ## DM_INCLUDES |
| 478 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 479 | |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 480 | DM_INCLUDES = [ |
benjaminwagner | b1fe8f6 | 2016-02-01 09:05:08 -0800 | [diff] [blame] | 481 | "dm", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 482 | "gm", |
| 483 | "src/codec", |
| 484 | "src/effects", |
benjaminwagner | bc9a9b4 | 2016-02-22 13:30:39 -0800 | [diff] [blame] | 485 | "src/effects/gradients", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 486 | "src/fonts", |
Hal Canary | db68301 | 2016-11-23 08:55:18 -0700 | [diff] [blame] | 487 | "src/images", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 488 | "src/pathops", |
| 489 | "src/pipe/utils", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 490 | "src/ports", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 491 | "tests", |
| 492 | "tools", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 493 | "tools/debugger", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 494 | "tools/flags", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 495 | "tools/gpu", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 496 | "tools/timer", |
| 497 | ] |
| 498 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 499 | ################################################################################ |
| 500 | ## DM_ARGS |
| 501 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 502 | |
Ben Wagner | 59f9edb | 2016-11-28 15:30:37 -0500 | [diff] [blame] | 503 | def DM_ARGS(asan): |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 504 | source = ["tests", "gm", "image"] |
| 505 | # TODO(benjaminwagner): f16 and serialize-8888 fail. |
| 506 | config = ["565", "8888", "pdf", "srgb", "tiles_rt", "pic"] |
| 507 | # TODO(mtklein): maybe investigate why these fail? |
| 508 | match = [ |
| 509 | "~Canvas", |
| 510 | "~Codec", |
| 511 | "~Codec_Dimensions", |
| 512 | "~Codec_stripes", |
| 513 | "~FontMgr", |
| 514 | "~PaintBreakText", |
| 515 | "~RecordDraw_TextBounds", |
| 516 | "~Scalar", |
| 517 | "~skps", |
| 518 | "~Stream", |
| 519 | ] |
| 520 | if asan: |
Ben Wagner | 59f9edb | 2016-11-28 15:30:37 -0500 | [diff] [blame] | 521 | # The ASAN we use with Bazel has some strict checks, so omit tests that |
| 522 | # trigger them. |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 523 | match += [ |
| 524 | "~clippedcubic2", |
| 525 | "~conicpaths", |
Ben Wagner | 59f9edb | 2016-11-28 15:30:37 -0500 | [diff] [blame] | 526 | "~^gradients", |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 527 | "~Math", |
| 528 | "~Matrix", |
Ben Wagner | 55b7253 | 2017-01-29 21:50:51 -0500 | [diff] [blame] | 529 | "~PathBigCubic", |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 530 | "~PathOpsCubic", |
benjaminwagner | b518862 | 2016-06-29 10:26:44 -0700 | [diff] [blame] | 531 | "~PathOpsFailOp", |
caryclark | 523e76d | 2016-07-19 12:27:32 -0700 | [diff] [blame] | 532 | "~PathOpsOpCubicsThreaded", |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 533 | "~PathOpsOpLoopsThreaded", |
| 534 | "~PathOpsSimplify", |
| 535 | "~PathOpsTightBoundsQuads", |
| 536 | "~Point", |
benjaminwagner | 1d35231 | 2016-07-25 06:32:13 -0700 | [diff] [blame] | 537 | "~sk_linear_to_srgb", |
Ben Wagner | 59f9edb | 2016-11-28 15:30:37 -0500 | [diff] [blame] | 538 | "~small_color_stop", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 539 | ] |
Ben Wagner | 59f9edb | 2016-11-28 15:30:37 -0500 | [diff] [blame] | 540 | return ["--src"] + source + ["--config"] + config + ["--match"] + match |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 541 | |
| 542 | ################################################################################ |
| 543 | ## COPTS |
| 544 | ################################################################################ |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 545 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 546 | COPTS_UNIX = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 547 | "-Wno-implicit-fallthrough", # Some intentional fallthrough. |
benjaminwagner | 7d974f5 | 2015-10-19 13:55:55 -0700 | [diff] [blame] | 548 | "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 549 | ] |
| 550 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 551 | COPTS_ANDROID = ["-mfpu=neon"] |
| 552 | |
| 553 | COPTS_IOS = [] |
| 554 | |
| 555 | COPTS_ALL = [] |
| 556 | |
| 557 | ################################################################################ |
| 558 | ## DEFINES |
| 559 | ################################################################################ |
| 560 | |
| 561 | DEFINES_UNIX = [ |
scroggo | 7732c0c | 2016-06-22 07:25:16 -0700 | [diff] [blame] | 562 | "PNG_SKIP_SETJMP_CHECK", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 563 | "SK_BUILD_FOR_UNIX", |
| 564 | "SK_SAMPLES_FOR_X", |
halcanary | 650e20d | 2016-08-25 09:07:02 -0700 | [diff] [blame] | 565 | "SK_PDF_USE_SFNTLY", |
benjaminwagner | 186e0b9 | 2016-02-11 16:00:24 -0800 | [diff] [blame] | 566 | "SK_CODEC_DECODES_RAW", |
msarett | ad3a5c6 | 2016-05-06 07:21:26 -0700 | [diff] [blame] | 567 | "SK_HAS_JPEG_LIBRARY", |
scroggo | e6939c1 | 2016-06-21 14:13:40 -0700 | [diff] [blame] | 568 | "SK_HAS_PNG_LIBRARY", |
scroggo | 7732c0c | 2016-06-22 07:25:16 -0700 | [diff] [blame] | 569 | "SK_HAS_WEBP_LIBRARY", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 570 | ] |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 571 | |
| 572 | DEFINES_ANDROID = [ |
| 573 | "SK_BUILD_FOR_ANDROID", |
benjaminwagner | 186e0b9 | 2016-02-11 16:00:24 -0800 | [diff] [blame] | 574 | "SK_CODEC_DECODES_RAW", |
msarett | ad3a5c6 | 2016-05-06 07:21:26 -0700 | [diff] [blame] | 575 | "SK_HAS_JPEG_LIBRARY", |
scroggo | e6939c1 | 2016-06-21 14:13:40 -0700 | [diff] [blame] | 576 | "SK_HAS_PNG_LIBRARY", |
scroggo | 7732c0c | 2016-06-22 07:25:16 -0700 | [diff] [blame] | 577 | "SK_HAS_WEBP_LIBRARY", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 578 | ] |
| 579 | |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 580 | DEFINES_IOS = [ |
| 581 | "SK_BUILD_FOR_IOS", |
sdefresne | e3fa811 | 2016-06-01 07:08:56 -0700 | [diff] [blame] | 582 | "SK_BUILD_NO_OPTS", |
Matt Sarett | 2d4fc27 | 2017-02-10 09:42:54 -0500 | [diff] [blame] | 583 | "SK_HAS_JPEG_LIBRARY", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 584 | "SK_IGNORE_ETC1_SUPPORT", |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 585 | "SKNX_NO_SIMD", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 586 | ] |
| 587 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 588 | DEFINES_ALL = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 589 | # Chrome DEFINES. |
| 590 | "SK_USE_FLOATBITS", |
| 591 | "SK_USE_FREETYPE_EMBOLDEN", |
| 592 | # Turn on a few Google3-specific build fixes. |
| 593 | "GOOGLE3", |
reed | d053ce9 | 2016-03-22 10:17:23 -0700 | [diff] [blame] | 594 | # Staging flags for API changes |
Yuqian Li | 8622b72 | 2016-11-14 15:42:58 -0500 | [diff] [blame] | 595 | # Temporarily Disable analytic AA for Google3 |
| 596 | "SK_NO_ANALYTIC_AA", |
Hal Canary | 1b3387b | 2016-12-12 13:48:12 -0500 | [diff] [blame] | 597 | "SK_SUPPORT_LEGACY_BITMAP_SETPIXELREF", |
Mike Reed | 3711e11 | 2016-12-20 08:17:36 -0500 | [diff] [blame] | 598 | "SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 599 | ] |
| 600 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 601 | ################################################################################ |
| 602 | ## LINKOPTS |
| 603 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 604 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 605 | LINKOPTS_UNIX = [] |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 606 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 607 | LINKOPTS_ANDROID = [ |
| 608 | "-lEGL", |
| 609 | ] |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 610 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 611 | LINKOPTS_IOS = [] |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 612 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 613 | LINKOPTS_ALL = [ |
| 614 | "-ldl", |
| 615 | ] |