Skip to content

Conversation

birkskyum
Copy link
Member

@birkskyum birkskyum commented Aug 30, 2025

To avoid issues like these

Simply make OpenGL Opt-In like Metal and Vulkan are.

Until now, to build with e.g. Metal, you had to opt into Metal (MLN_WITH_METAL=ON), but a number of issues would occur if you forget to also opt-out of OpenGL (MLN_WITH_OPENGL=OFF). This removes the need for opting out.

Added MLN_WITH_OPENGL=ON to Qt, Node CI and Android App which didn't have explicit setting of the flag.

Also change a few "else // OpenGL" to "elif OPENGL", for strict conditional logic

Copy link

github-actions bot commented Aug 30, 2025

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3772-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +46% +53.4Mi  +483% +28.8Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3772-compared-to-legacy.txt

Copy link

github-actions bot commented Aug 30, 2025

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            +0.0043         +0.0042             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-3772-compared-to-main.txt

@birkskyum birkskyum changed the title set MLN_WITH_OPENGL/METAL=OFF by default set MLN_WITH_OPENGL=OFF by default, like Metal/Vulkan Aug 30, 2025
@birkskyum birkskyum requested a review from louwers August 30, 2025 14:01
@louwers louwers added the build Related to build, configuration or CI/CD label Aug 30, 2025
@louwers
Copy link
Member

louwers commented Aug 30, 2025

Might need to update CMakePresets.json. But good to merge if CI passes.

Copy link

github-actions bot commented Aug 30, 2025

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-3772-compared-to-main.txt

@birkskyum
Copy link
Member Author

birkskyum commented Aug 30, 2025

All pass, except for Windows MSYS2 CI, which appear to fail because of MSYS2's toolchain is linking both static (libz.a, libstdc++.a) and dynamic (libz.dll.a) versions, causing duplicate symbols. I don't think it's caused by this PR - has it been reported before?

Setting the --allow-multiple-definitions doesn´t seem to resolve it.

@louwers
Copy link
Member

louwers commented Aug 30, 2025

Yes it is a known issue. #3670

@birkskyum birkskyum force-pushed the set-MLN_WITH_OPENGL-and-METAL-off-by-default branch from 0bb4302 to 964e685 Compare August 30, 2025 19:12
@birkskyum birkskyum merged commit 46e2842 into maplibre:main Aug 30, 2025
85 of 107 checks passed
TimSylvester added a commit to WetDogWeather/maplibre-gl-native that referenced this pull request Sep 3, 2025
* main:
  Create macOS amalgamation for core releases (maplibre#3768)
  Add weak pointer handling (maplibre#3763)
  Temporarily disable Windows CI (maplibre#3775)
  chore(ci): pin actions to shas (maplibre#3769)
  Fix compile error when building with MLN_USE_TRACY (maplibre#3774)
  set MLN_WITH_OPENGL=OFF by default, like Metal/Vulkan (maplibre#3772)
  Tweak Linux amalgamation (maplibre#3767)
  Tweak layer depth distribution (maplibre#3738)
  Add Sentry build tags (maplibre#3765)
  Release MapLibre Android 11.13.1 (maplibre#3761)
  Release MapLibre iOS 6.18.1 (maplibre#3762)
  Add weak pointer management to RasterSource and derived classes (maplibre#3726)
  Fix UB in TaggedString constructor (maplibre#3748)
  Add Compose Multiplatform section to README (maplibre#3751)
  format Bazel files with buildifier (maplibre#3756)
  use separate install-sccache script (maplibre#3755)
  Fix Android backend cleanup (maplibre#3681)

# Conflicts:
#	include/mbgl/style/sources/raster_dem_source.hpp
#	include/mbgl/style/sources/vector_source.hpp
#	platform/ios/BUILD.bazel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to build, configuration or CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants