@@ -37,19 +37,23 @@ def main():
3737 'skia_use_system_harfbuzz=false' ,
3838 'skia_pdf_subset_harfbuzz=true' ,
3939 'skia_use_system_icu=false' ,
40- 'skia_enable_skottie=true'
40+ 'skia_enable_skottie=true' ,
41+
42+ # Just to make following "+=" work unconditionally
43+ 'extra_cflags=[]' ,
44+ 'extra_cflags_cc=[]' ,
4145 ]
4246
4347 if isMacos or isIos or isTvos :
4448 if isMacos :
4549 args += ['skia_use_fonthost_mac=true' ]
46- args += ['extra_cflags_cc=["-frtti"]' ]
50+ args += ['extra_cflags_cc+ =["-frtti"]' ]
4751 args += ['skia_use_metal=true' ]
4852 if isIos :
4953 args += ['target_os="ios"' ]
5054 if isIosSim :
5155 args += ['ios_use_simulator=true' ]
52- args += ['extra_cflags=["-mios-simulator-version-min=12.0"]' ]
56+ args += ['extra_cflags+ =["-mios-simulator-version-min=12.0"]' ]
5357 else :
5458 args += ['ios_min_target="12.0"' ]
5559 else :
@@ -58,33 +62,33 @@ def main():
5862 # Metal needs tvOS version 14 and SK_BUILD_FOR_TVOS to skip legacy iOS checks
5963 if isTvosSim :
6064 args += ['ios_use_simulator=true' ]
61- args += ['extra_cflags=["-mtvos-simulator-version-min=14", "-DSK_BUILD_FOR_TVOS"]' ]
65+ args += ['extra_cflags+ =["-mtvos-simulator-version-min=14", "-DSK_BUILD_FOR_TVOS"]' ]
6266 else :
63- args += ['extra_cflags=["-mtvos-version-min=14", "-DSK_BUILD_FOR_TVOS"]' ]
67+ args += ['extra_cflags+ =["-mtvos-version-min=14", "-DSK_BUILD_FOR_TVOS"]' ]
6468 else :
6569 if 'arm64' == machine :
66- args += ['extra_cflags=["-stdlib=libc++"]' ]
70+ args += ['extra_cflags+ =["-stdlib=libc++"]' ]
6771 else :
68- args += ['extra_cflags=["-stdlib=libc++", "-mmacosx-version-min=10.13"]' ]
72+ args += ['extra_cflags+ =["-stdlib=libc++", "-mmacosx-version-min=10.13"]' ]
6973 elif 'linux' == target :
7074 if 'arm64' == machine :
7175 args += [
7276 'skia_gl_standard="gles"' ,
7377 'skia_use_egl=true' ,
74- 'extra_cflags_cc=["-fno-exceptions", "-fno-rtti", "-D_GLIBCXX_USE_CXX11_ABI=0", "-mno-outline-atomics"]' ,
78+ 'extra_cflags_cc+ =["-fno-exceptions", "-fno-rtti", "-D_GLIBCXX_USE_CXX11_ABI=0", "-mno-outline-atomics"]' ,
7579 'cc="gcc-10"' ,
7680 'cxx="g++-10"' ,
7781 ]
7882 else :
7983 args += [
80- 'extra_cflags_cc=["-fno-exceptions", "-fno-rtti","-D_GLIBCXX_USE_CXX11_ABI=0"]' ,
84+ 'extra_cflags_cc+ =["-fno-exceptions", "-fno-rtti","-D_GLIBCXX_USE_CXX11_ABI=0"]' ,
8185 'cc="gcc-10"' ,
8286 'cxx="g++-10"' ,
8387 ]
8488 elif 'windows' == target :
8589 args += [
8690 'skia_use_direct3d=true' ,
87- 'extra_cflags=["-DSK_FONT_HOST_USE_SYSTEM_SETTINGS"]' ,
91+ 'extra_cflags+ =["-DSK_FONT_HOST_USE_SYSTEM_SETTINGS"]' ,
8892 ]
8993 if 'windows' == host :
9094 clang_path = shutil .which ('clang-cl.exe' )
@@ -131,7 +135,7 @@ def main():
131135 'skia_enable_gpu=true' ,
132136 'skia_enable_svg=true' , # other targets have this set in skia.gni
133137 'skia_use_expat=true' , # other targets have this set in skia.gni
134- 'extra_cflags=["-DSK_SUPPORT_GPU=1", "-DSK_GL", "-DSK_DISABLE_LEGACY_SHADERCONTEXT", "-sSUPPORT_LONGJMP=wasm"]'
138+ 'extra_cflags+ =["-DSK_SUPPORT_GPU=1", "-DSK_GL", "-DSK_DISABLE_LEGACY_SHADERCONTEXT", "-sSUPPORT_LONGJMP=wasm"]'
135139 ]
136140
137141 # Unhide path edit methods for compatible migration
0 commit comments