Skip to content

Commit dd66d45

Browse files
committed
wip: windows build
1 parent beddde6 commit dd66d45

File tree

1 file changed

+160
-0
lines changed

1 file changed

+160
-0
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
#!/bin/bash
2+
set -ev
3+
here=$(dirname "$(readlink -f "$BASH_SOURCE")")
4+
5+
# relevant issues (on ubuntu 22.10):
6+
# * -Wpsabi with no avx512f in march
7+
# - https://groups.google.com/a/skia.org/g/bugs/c/4GuY7jjfCzY
8+
# - https://bugs.chromium.org/p/chromium/issues/detail?id=1112929&no_tracker_redirect=1
9+
# * harfbuzz 2.x not having hb-subset.h for pdf support:
10+
# - https://groups.google.com/a/skia.org/g/bugs/c/4GuY7jjfCzY
11+
# * missing SK_API declarations for defitions in SkParagraph:
12+
# - https://skia-review.googlesource.com/c/skia/+/878977
13+
# * missing include https://skia-review.googlesource.com/c/skia/+/878977
14+
"$here/patch_skia_m124.sh"
15+
16+
cd "$here/../../contrib/skia"
17+
pwd
18+
export GIT_SYNC_DEPS_SKIP_EMSDK="true"
19+
python tools/git-sync-deps
20+
21+
mkdir -p out/Shared
22+
cat > out/Shared/args.gn <<- EOF
23+
cc = "clang"
24+
cxx = "clang++"
25+
clang_win="C:/Program Files/LLVM"
26+
win_sdk="C:/Program Files (x86)/WIndows Kits/10"
27+
win_sdk_version=""
28+
win_toolchain_version=""
29+
win_vc=""
30+
31+
#extra_cflags = ["-Wno-psabi"]
32+
extra_cflags = ["-D_HAS_AUTO_PTR_ETC"]
33+
34+
is_official_build=true
35+
is_debug=false
36+
is_trivial_abi=false
37+
is_component_build=true
38+
skia_use_gl=true
39+
sanitize=""
40+
skia_build_for_debugger=false
41+
skia_build_fuzzers=false
42+
skia_build_rust_targets=false
43+
skia_compile_modules=false
44+
skia_compile_sksl_tests=false
45+
skia_disable_tracing=true
46+
skia_disable_vma_stl_shared_mutex=false
47+
skia_enable_android_utils=false
48+
skia_enable_api_available_macro=true
49+
skia_enable_bentleyottmann=true
50+
skia_enable_direct3d_debug_layer=false
51+
skia_enable_discrete_gpu=true
52+
skia_enable_fontmgr_FontConfigInterface=false
53+
skia_enable_fontmgr_android=false
54+
skia_enable_fontmgr_custom_directory=true
55+
skia_enable_fontmgr_custom_embedded=true
56+
skia_enable_fontmgr_custom_empty=true
57+
skia_enable_fontmgr_empty=false
58+
skia_enable_fontmgr_fontconfig=false
59+
skia_enable_fontmgr_fuchsia=false
60+
skia_enable_fontmgr_win=true
61+
skia_enable_fontmgr_win_gdi=true
62+
skia_enable_ganesh=true
63+
skia_enable_gpu=true
64+
#skia_enable_gpu_debug_layers=false
65+
skia_enable_graphite=false
66+
skia_enable_metal_debug_info=false
67+
skia_enable_optimize_size=false
68+
skia_enable_pdf=true
69+
skia_enable_precompile=true
70+
skia_enable_skottie=false
71+
skia_enable_skparagraph=true
72+
skia_enable_skshaper=true
73+
skia_enable_skshaper_tests=false
74+
skia_enable_sksl_tracing=false
75+
skia_enable_skunicode=true
76+
skia_enable_spirv_validation=false
77+
skia_enable_svg=false
78+
skia_enable_tools=false
79+
skia_enable_vello_shaders=false
80+
skia_enable_vulkan_debug_layers=false
81+
skia_enable_winuwp=false
82+
skia_generate_workarounds=false
83+
skia_gl_standard=""
84+
skia_include_multiframe_procs=false
85+
skia_lex=false
86+
skia_pdf_subset_harfbuzz=true
87+
skia_print_native_shaders=false
88+
skia_print_sksl_shaders=false
89+
skia_use_angle=false
90+
skia_use_client_icu=false
91+
skia_use_dawn=false
92+
skia_use_direct3d=false
93+
skia_use_dng_sdk=true
94+
skia_use_egl=false
95+
skia_use_epoxy_egl=false
96+
skia_use_expat=true
97+
skia_use_ffmpeg=false
98+
skia_use_fixed_gamma_text=false
99+
skia_use_fontations=false
100+
skia_use_fontconfig=false
101+
skia_use_fonthost_mac=false
102+
skia_use_freetype=true
103+
skia_use_freetype_woff2=true
104+
skia_use_freetype_zlib=true
105+
skia_use_freetype_zlib_bundled=false
106+
skia_use_gl=true
107+
skia_use_harfbuzz=true
108+
skia_use_icu=true
109+
skia_use_icu4x=false
110+
skia_use_jpeg_gainmaps=false
111+
skia_use_libavif=false
112+
skia_use_libfuzzer_defaults=true
113+
skia_use_libgrapheme=false
114+
skia_use_libheif=false
115+
skia_use_libjpeg_turbo_decode=true
116+
skia_use_libjpeg_turbo_encode=true
117+
skia_use_libjxl_decode=false
118+
skia_use_libpng_decode=true
119+
skia_use_libpng_encode=true
120+
skia_use_libwebp_decode=true
121+
skia_use_libwebp_encode=true
122+
skia_use_lua=false
123+
skia_use_metal=false
124+
skia_use_ndk_images=false
125+
skia_use_no_jpeg_encode=false
126+
skia_use_no_png_encode=false
127+
skia_use_no_webp_encode=false
128+
skia_use_perfetto=false
129+
skia_use_piex=true
130+
skia_use_runtime_icu=false
131+
skia_use_safe_libcxx=false
132+
skia_use_sfml=false
133+
skia_use_system_expat=false
134+
skia_use_system_freetype2=false
135+
skia_use_system_harfbuzz=false
136+
skia_use_system_icu=false
137+
skia_use_system_libjpeg_turbo=false
138+
skia_use_system_libpng=false
139+
skia_use_system_libwebp=false
140+
skia_use_system_zlib=false
141+
skia_use_vma=false
142+
skia_use_vulkan=false
143+
skia_use_webgl=false
144+
skia_use_webgpu=false
145+
skia_use_wuffs=true
146+
skia_use_x11=false
147+
skia_use_xps=true
148+
skia_use_zlib=true
149+
skunicode_tests_enabled=false
150+
werror=false
151+
EOF
152+
#extra_ldflags = [ "-fuse-ld=lld", "-Wl,-rpath,${clangdir}/lib/x86_64-unknown-linux-gnu" ]
153+
154+
./bin/gn.exe gen out/Shared
155+
#./bin/gn.exe args out/Shared --list
156+
#./bin/gn args out/Shared --list --short
157+
158+
./third_party/ninja/ninja -v -d keeprsp -C out/Shared
159+
"$here/patch_skia_m124.sh"
160+
./third_party/ninja/ninja -v -d keeprsp -C out/Shared

0 commit comments

Comments
 (0)