Skip to content

Commit

Permalink
[WPE][CMake] Pass enabled sanitizers to Cog build
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259283

Reviewed by Michael Catanzaro.

Previously if you built with `ENABLE_SANITIZERS` then Cog
could fail to link with libasan. Passing the option
through fixes this. All of the allowed values are supported.

* Tools/PlatformWPE.cmake:

Canonical link: https://commits.webkit.org/266125@main
  • Loading branch information
TingPing committed Jul 18, 2023
1 parent 0f2ddd2 commit a445773
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tools/PlatformWPE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ if (ENABLE_COG)
set(COG_MESON_BUILDTYPE debugoptimized)
endif ()

if (ENABLE_SANITIZERS)
set(COG_MESON_SANITIZE_OPTION "${ENABLE_SANITIZERS}")
else ()
set(COG_MESON_SANITIZE_OPTION "none")
endif ()

ExternalProject_Add(cog
GIT_REPOSITORY "${WPE_COG_REPO}"
GIT_TAG "${WPE_COG_TAG}"
Expand All @@ -62,6 +68,7 @@ if (ENABLE_COG)
--pkg-config-path ${WPE_COG_PKG_CONFIG_PATH}
-Dwpe_api=${WPE_API_VERSION}
-Dplatforms=${WPE_COG_PLATFORMS}
-Db_sanitize=${COG_MESON_SANITIZE_OPTION}
BUILD_COMMAND
meson compile -C <BINARY_DIR>
INSTALL_COMMAND "")
Expand Down

0 comments on commit a445773

Please sign in to comment.