From 8bd4445b544c77203b18b8b92f434f45362332ee Mon Sep 17 00:00:00 2001 From: Jordan Coult Date: Sun, 20 Oct 2024 09:27:11 -0500 Subject: [PATCH] Add GDAL-recommended build args --- steps/05-configure.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/steps/05-configure.sh b/steps/05-configure.sh index c1f65cc..4d6691d 100755 --- a/steps/05-configure.sh +++ b/steps/05-configure.sh @@ -16,10 +16,20 @@ mkdir -p "$BUILD" echo "pdf_use_partition_alloc = false" echo "target_cpu = \"$TARGET_CPU\"" echo "target_os = \"$OS\"" - echo "pdf_enable_v8 = $ENABLE_V8" + echo "pdf_enable_v8 = $ENABLE_V8" # Should be false - no need for JavaScript. echo "pdf_enable_xfa = $ENABLE_V8" echo "treat_warnings_as_errors = false" echo "is_component_build = false" + echo "pdf_use_skia = false" # Disable experimental Skia backend + echo "pdf_use_skia_paths = false" # Disable experimental Skia paths backend + echo "pdf_is_complete_lib = true" + echo "use_custom_libcxx = false" # Avoid incompatible namespace std::1:: + echo "use_rtti = true" # Enable RTTI for virtual class subclassing + echo "use_system_libjpeg = true" + echo "use_system_libpng = true" + echo "use_system_lcms2 = true" + echo "use_system_libopenjpeg2 = true" + echo "use_sysroot = false" # Prevent fetching incompatible headers if [ "$ENABLE_V8" == "true" ]; then echo "v8_use_external_startup_data = false" @@ -29,7 +39,7 @@ mkdir -p "$BUILD" case "$OS" in android) echo "clang_use_chrome_plugins = false" - echo "default_min_sdk_version = 21" + echo "default_min_sdk_version = 21" # Can change this if needed ;; ios) [ -n "$TARGET_ENVIRONMENT" ] && echo "target_environment = \"$TARGET_ENVIRONMENT\"" @@ -46,7 +56,6 @@ mkdir -p "$BUILD" echo "clang_use_chrome_plugins = false" ;; wasm) - echo 'pdf_is_complete_lib = true' echo 'is_clang = false' ;; esac @@ -55,18 +64,20 @@ mkdir -p "$BUILD" musl) echo 'is_musl = true' echo 'is_clang = false' - echo 'use_custom_libcxx = false' - [ "$ENABLE_V8" == "true" ] && case "$TARGET_CPU" in - arm) + # 'use_custom_libcxx = false' is already set globally + if [ "$ENABLE_V8" == "true" ]; then + case "$TARGET_CPU" in + arm) echo "v8_snapshot_toolchain = \"//build/toolchain/linux:clang_x86_v8_arm\"" ;; - arm64) + arm64) echo "v8_snapshot_toolchain = \"//build/toolchain/linux:clang_x64_v8_arm64\"" ;; - *) + *) echo "v8_snapshot_toolchain = \"//build/toolchain/linux:$TARGET_CPU\"" ;; - esac + esac + fi ;; esac